Topic: DataTable: Add events for column sort selections
I am currently looking at implementing server-side searching and pagination and I understand that the DataTable does not support this out of the box, which is fine. I will use an external pagination control, as well as that I would be using a custom searching component (partial view) anyways for specific search criteria for the application. However I would like to make use of the DataTable's excellent sorting UI in the column headers but I can see there aren't any events that I might hook into to trigger a data refresh on a sorting change. Right now the headers would just affect the sorting of the current view the grid has, which will be a single page.
Expected Result: When I click on a header to sort the data table, I would like to have the option of capturing an event with an identifier what column was clicked and the sort direction selected. This way I can compose a new search call with the appropriate sorting and then update the data table with the appropriate page of information.
Actual Result: If I load a single page of data then click on a sorting header, it will just sort the values current page.
Justification: If I am on Page 1 of 10 pages of records and go to sort by name, I expect that the grid would refresh to show the first page of all records sorted by name, not just sort the current page items by name.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No