Dropdown Selection Using Server Side Datatable | Php, Sql Server
Solution 1:
Example you are referring to has static data and does filter in UI itself.
But in your case you are using server side processing which means sorting logic should be handle by the server side code.
initComplete method consider data returned by the API and fills the combobox, which is what it need to do.
To make it work as per your requirement
Don't use server side processing and load all data at once as given in example
If you need to use Server side processing
You might need to customize
initCompletefunction to call another API which returns all unique columns data and loads it.Note: Also you might need to write logic for "when you select a value from combobox"
I am sure Datatable will add selected combo value as parameter to API and based on that you need to process data in backend and return appropriate response.
Post a Comment for "Dropdown Selection Using Server Side Datatable | Php, Sql Server"