Can I initialize a table from HTML DOM and later control in in server-side?

Can I initialize a table from HTML DOM and later control in in server-side?

snehanshusnehanshu Posts: 1Questions: 1Answers: 0

I want my table to be loaded from HTML DOM at first, but after that, I want to perform tasks like searching, pagination from server-side. How can I do that? By studying the docs it seems like that I have to initialize dataTable with ajax JSON and then only I can control it in server-side.

Answers

  • bindridbindrid Posts: 730Questions: 0Answers: 119

    If you look at http://live.datatables.net/ and the many examples through out the datatables.net website, you will see that the html is generated serverSide.

    Then, on the client browser, the $("#example").DataTable(); is executed to give it the whole search, sort, paging stuff.

    Beyond that, your question is not clear to as to what you are trying to accomplish.

  • allanallan Posts: 61,722Questions: 1Answers: 10,108 Site admin

    I think, although I'm not certain, that this example shows what the OP was asking for. It loads the first page of the data from the DOM (which has been put in place by some server-side process) and then uses server-side processing for every subsequent draw.

    Allan

This discussion has been closed.