Datatable re-initialization.
Datatable re-initialization.
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!
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!
This discussion has been closed.
Replies
Allan