Is there a way to set the initial starting record?
Is there a way to set the initial starting record?
I would like for example to have the DataTable's first row be row 1536
I would like the user to be able to click a hyperlink on a previous page and the grid will then start from the index I tell it.
I would want the pagination to work properly as well with Ajax loading.
Cheers
Chris
I would like the user to be able to click a hyperlink on a previous page and the grid will then start from the index I tell it.
I would want the pagination to work properly as well with Ajax loading.
Cheers
Chris
This discussion has been closed.
Replies
Allan
Thanks for the info - but I have since found that I can simple configure an init parameter to do the work.
$(document).ready(function () {
$('#example').dataTable({
"bSort": false,
"bFilter": false,
"bLengthChange": false,
"bProcessing": true,
"sPaginationType": "full_numbers",
"bServerSide": true,
"iDisplayStart": <%=GetStartIndex()%>,
"iDisplayLength": 29,
"sAjaxSource": "/QuakeMap/Single/ServerProcessing.aspx",
"fnServerData": fnDataTablesPipeline,
"fnRowCallback": function (nRow, aData, iDisplayIndex) {
/* Append the grade to the default row class name */
if (iDisplayIndex == 0)
$(nRow).addClass('row_selected');
return nRow;
}
});
Cheers
Chris
We have had an earthquake about 7 weeks ago in Christchurch, New Zealand.
We have well over 2,000 afrer shocks hence the need for this great DataTables object.
This has made the site better - The site went from 300 visitors to 4300 when a Quake hit this afternoon (4.8) and the DataTables made the site handle it better then previously.
Chris
http://quake.crowe.co.nz
Nice use of DataTables on your site - thanks very much for the link! Great to hear that DataTables is proving to be useful!
Allan