Keeping Sort/page/number displayed when returning from edit page
Keeping Sort/page/number displayed when returning from edit page
Hi
Can someone please help? I have an edit/delete field in each row of the table and when clicked goes to the edit/delete pages accordingly. My problem is that when I return to the page my original parameters, if I had set the number of pages to displayed, sort etc are reset.
Is there a way to retain these setting?
Moris
Can someone please help? I have an edit/delete field in each row of the table and when clicked goes to the edit/delete pages accordingly. My problem is that when I return to the page my original parameters, if I had set the number of pages to displayed, sort etc are reset.
Is there a way to retain these setting?
Moris
This discussion has been closed.
Replies
So when you edit the record the browser goes to a different url, rather than some Ajax stuff? In that case bStateSave might do just what you are looking for - http://datatables.net/usage/features#bStateSave
Regards,
Allan
[code]
$(document).ready(function() {
$('#GridView1').dataTable( {'bStateSave': true} );
} );
[/code]
If I go to another page and come back the no of items show,filter etc are not resored when I come back.
Anything else I need to do?
Regards
Moris
No - that should do it. Here is a live example: http://datatables.net/examples/basic_init/state_save.html
Are you able to link us to an example which isn't state saving?
it's worth noting hat there is a known problem with state saving when it tries to store more than 4K of data (which you can't do). This is something I'm looking at how to fix, but browser bugs are making it difficult. This only happens when you have a lot of different tables on your site though.
Regards,
Allan