Keep DataTables data in memory in-between postbacks

Keep DataTables data in memory in-between postbacks

kalpesh2804kalpesh2804 Posts: 10Questions: 3Answers: 1

Hello,

I am using Asp.net and jQuery DataTables for GridView.

I want to keep Data as it as while postback asp.net forms.

is it possible ?

thanks
Kalpesh

Replies

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Do you have form elements in your table? You'll need to set the page length (page.len()) to be -1 before you submit the form. DataTables removes the DOM elements it doesn't need from the display for performance reasons.

    Allan

  • kalpesh2804kalpesh2804 Posts: 10Questions: 3Answers: 1

    where i need to set page.len() variable ?

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    As I said, you'd set it before you submit the form - in a submit event handler would be the place to do it.

    Allan

This discussion has been closed.