turn to page after redraw
turn to page after redraw
guy.schaller
Posts: 4Questions: 0Answers: 0
hi ,
i have a datatable which i then sometime add content to and redraw it
anyay i want to go back to the page the user have been looking at in the datatable
so 2 questions:
1. how can i get the page the user is in? or how do i bind the the event of paging? so i can store the page manualy
2. i found a function in your api to go the next and previous page but it dosnt get an int.
is there anyway to jump to a certain page? and not just the next page?
thank you
i have a datatable which i then sometime add content to and redraw it
anyay i want to go back to the page the user have been looking at in the datatable
so 2 questions:
1. how can i get the page the user is in? or how do i bind the the event of paging? so i can store the page manualy
2. i found a function in your api to go the next and previous page but it dosnt get an int.
is there anyway to jump to a certain page? and not just the next page?
thank you
This discussion has been closed.
Replies
1. There isn't a way to get the page number as such - but it's fairly easy to calculate. The following information is available:
[code]
var oSettings = oTable.fnSettings();
oSettings.fnRecordsTotal() // Number of records before filtering
oSettings.fnRecordsDisplay() // Number of records in set after filtering
oSettings.fnDisplayEnd() // End index
oSettings._iDisplayStart // Start index
oSettings._iDisplayLength // length
[/code]
2. Again not really I'm afraid. Using the above it would be possible to calculate, not there isn't a simple API function available at this time which will just take a page parameter. Of course if you fancy writing one, I'll certainly put it up on the site!
Allan