Perform Server-side Processing only during Search
Perform Server-side Processing only during Search
kevinjt
Posts: 10Questions: 1Answers: 0
Hello, I was reading the serverside option (https://datatables.net/reference/option/serverSide) and I was wondering if serverside is enabled only for searching while disabled for paging and sorting?
I was trying to retain the selected data (using select: true) while able to perform serverside processing. However, my table only can do one function if the other is disabled.
Thank you
Replies
Well, if you don't need it for paging and sorting then you don't need server side processing.
Server side search has serious disadvantages compared with client side search: You can only search for database values nothing that is rendered for client display. That is the biggest disadvantage in my opinion. So why would you want this? In my opinion you would only put up with this if you need server side for performance reasons which you don't because you don't want it for paging and sorting.
Should be no problem to retain selected data. But what is your issue?
Hmmm, I have no idea what that means
If the problem you are trying to solve is to keep selected rows when using server side processing then give the Gyrocode select checkboxes plugin a try. It uses the Select extension. It has the capability of keeping track of the rows selected when using server side processing. See this example. Any questions about the plugin should go to the developer.
Another option is to keep track of the selected rows yourself. Using the
draw
event you can reselect any selected rows shown on the page. This likely will require a unique ID for each row so they can be reselected when they are displayed on the page.Kevin