I am looking at jQuery as an alternative to an ASP.net Gridview for use in paging data to reduce database calls (I looked into ObjectDataSourc es as an alternative, but it seemed to take longer than the default paging due to the need to run the Row_Number function on each row before selecting the rows needed).
I am using the plugin found here: http://plugins.jquery.com/project/pagination
The dataset I am trying to load has about 198k records.
I am placing the rows into a table with display:none and cloning them into the SearchResult table.
If I only use the first 65,540 rows, it works like a dream, but if I try to use 65,541 rows, it does not work and does not report any errors.
Since this number is just slightly above the 16 bit limit, it seems unlikely that a variable limit is responsible, but then again, it is so close that it makes me wonder. Perhaps a browser limitation? I am using IE and Chrome with the same results.
Here is the javascript I am using to display different pages, for the plugin script, follow the link above.
Thanks in advance for any help you may be able to provide.
I am using the plugin found here: http://plugins.jquery.com/project/pagination
The dataset I am trying to load has about 198k records.
I am placing the rows into a table with display:none and cloning them into the SearchResult table.
If I only use the first 65,540 rows, it works like a dream, but if I try to use 65,541 rows, it does not work and does not report any errors.
Since this number is just slightly above the 16 bit limit, it seems unlikely that a variable limit is responsible, but then again, it is so close that it makes me wonder. Perhaps a browser limitation? I am using IE and Chrome with the same results.
Here is the javascript I am using to display different pages, for the plugin script, follow the link above.
Code:
<script>
function pageselectCallback(page_index, jq) {
$('#Searchresult').empty();
for(i=page_index * 500;i<(page_index * 500)+500;i++)
{
var new_content = jQuery('#row_' + i).clone();
$('#Searchresult').append(new_content);
}
return true;
}
function initPagination() {
// count entries inside the hidden content
var num_entries = jQuery('#hiddenContent tr').length;
// Create content inside pagination element
$("#Pagination").pagination(num_entries, {
callback: pageselectCallback,
items_per_page: 500,
load_first_page: true
});
}
// When document is ready, initialize pagination
$(document).ready(function() {
initPagination();
});
</script>