Adding more data to table server side

Adding more data to table server side

BokBok Posts: 2Questions: 0Answers: 0
edited August 2013 in DataTables 1.9
Love this plug-in!

Would it be possible to add a button to the table for which on-click would call a server side script to query a mysql table to get more data and append this to the current table client side ?

This would be kind of a hybrid, where bServerSide is set to false.

For instance, I have tables with 100,000+ rows, I currently limit it to 1000 server side using indexes (there is a 'rank' column which I can use rather than using limit 0,1000).

I'd like the user to be able to choose to add another 1000 rows with a click, server side the sql would be trivial, I just don't quite understand how to fire off this event and add the data. I have read the pipelining example and I guess it's something like that. Any pointers ?

Thanks

Replies

  • BokBok Posts: 2Questions: 0Answers: 0
    FYI, I went a different route on this. Essentially I do a count on my table ahead of time and depending on the resultset size, I create the datatable differently.

    If > 5000 I create it as serverside and limit the columns that can be sorted on based on index availabilty and remove the search too.. Otherwise I create it as a client side with all of the flexibility.

    Works well.
This discussion has been closed.