Datatable re-initialization.

Datatable re-initialization.

sunmit9sunmit9 Posts: 19Questions: 1Answers: 0
edited November 2013 in General
I am using a JQUery datatable Version 1.7.5.
I am showing a datatable on a dialog box., with normal 'Save' and 'Cancel' buttons on it.
At run time, I apply sort on different columns or change the Number of rows to display and hit Cancel to close the dialog. I am not able to refresh the datatable settings the next time it pops up on the dialog box. The previous actions I persormed still persist. I.e. the 'iDisplayLength' remains the same that i had selected before closing, or the column sorted still remains the same.

I tried oTable.fnDraw() and oTable.fnClearTable().
But, it does not reset the datatable parameters to the init values.

I guess the position i initialize my datatable plays some role in the same. I have initialized the datatable in the $(function() {}); of my JavaScript.

Do I need to change that!

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I can't remember if 1.7.5 has fnDestroy or not. If it does, then that is what you want, if it isn't then you need upgrade - 1.7.5 is very old now!

    Allan
This discussion has been closed.