问题
Here I have a bootstrap styled fixed column datatable where i can toggle the columns by a button as,
$('#ToggleColumns').click(function () {
table.destroy();
if(columnNumber == 2)
{
columnNumber = 0;
}
else {
columnNumber = 2;
}
});
If I am at the 3rd page of datatable pagination and when I toggling the columns, the table restores to its initial position. ie, first page. How can I prevent it and be there in the 3rd page itself after toggling? The same applies to the no. of record selection too.
来源:https://stackoverflow.com/questions/26436791/prevent-the-jquery-datatable-to-restore-to-initial-state-when-clicking-the-toggl