<DataTable Class="table table-striped" ID="dtLazyLoad">
<DataLayer JsonFile="Data.Products.json" Type="JsonFile" XPath="rdData/dtLazyLoad/Products/Product">
<ConditionFilter Condition="[at]Data.-ProductID[tilde] >= (([at]Request.page[tilde]-1)*[at]Request.RowsPerPage[tilde])+1 AND [at]Data.-ProductID[tilde] <= ([at]Request.page[tilde]*[at]Request.RowsPerPage[tilde])" />
</DataLayer>
<AutoColumns />
</DataTable>
<Label Class="text-danger" ID="lblMessage" />
/*START INCLUDE SCRIPT ELEMENT...*/
var nextPage = [at]Request.page[tilde];
var isRunning = false;
$(window).on('load scroll', function() {
//Set timeout interval to keep scroll listener from firing multiple times.
if(!isRunning)
scrollHandler();
});
scrollHandler = function () {
isRunning = true;
if($(window).scrollTop() + $(window).height() > $(document).height() - 2200) {
nextPage++;
var DataTableName = $('[id^=rdDataTableDiv]>table').attr('id');
var AjaxUrl = './rdPageAsync.aspx?rdReport=[at]Request.rdReport[tilde]&page='+nextPage;
$.ajax({
url: AjaxUrl,
async: true,
success: function(responseData) {
var rowsData = $(responseData).find('#'+DataTableName+'>tbody>tr');
var rowNum = ((nextPage-1)*[at]Request.RowsPerPage[tilde])+1;
rowsData.each(function() {
rowNum++;
$('#'+DataTableName+' tr.blur').removeClass('blur');
$(this).attr('row', rowNum).addClass('blur');
$('#'+DataTableName+'>tbody').append($(this));
});
if(rowsData.length == 0){
//Finished
$('#'+DataTableName+' tr.blur').removeClass('blur');
$('#lblMessage').html('End of data...').delay(1500).fadeOut();
$(window).unbind('scroll');
}
else {
scrollHandler();
}
}
});
}
else {
isRunning = false;
$('.blur').removeClass('blur');
}
};
/*...END INCLUDE SCRIPT*/
<Division ID="dvExample" HtmlDiv="True">
<DataTable Class="table table-striped" ID="dtLazyLoad">
<DataLayer JsonFile="Data.Products.json" Type="JsonFile" XPath="rdData/dtLazyLoad/Products/Product">
<ConditionFilter Condition=" >= ((1-1)*2)+1 AND <= (1*2)" IncludeCondition="'1' != ''" />
</DataLayer>
<AutoColumns />
</DataTable>
<Label Class="text-danger" ID="lblMessage" />
<IncludeScript IncludedScript="var nextPage = parseInt('1' || 1);
var rowsPerPage = parseInt('2' || 1);
var isRunning = false;
$(window).on('load scroll', function() {
 //Set timeout interval to keep scroll listener from firing multiple times.
 if(!isRunning)
 scrollHandler();
});
scrollHandler = function () {
 isRunning = true; 
 if($(window).scrollTop() + $(window).height() > $(document).height() - 500) {
 nextPage++;
 var DataTableName = $('[id^=rdDataTableDiv]>table').attr('id');
 var AjaxUrl = './rdPageAsync.aspx?rdReport=Extend.LazyDataTable&page='+nextPage;
 $.ajax({
 url: AjaxUrl, 
 async: true,
 success: function(responseData) {
 var rowsData = $(responseData).find('#'+DataTableName+'>tbody>tr');
 var rowNum = ((nextPage-1)*rowsPerPage)+1;
 rowsData.each(function() {
 rowNum++;
 $('#'+DataTableName+' tr.blur').removeClass('blur');
 $(this).attr('row', rowNum).addClass('blur');
 $('#'+DataTableName+'>tbody').append($(this));
 });
 
 if(rowsData.length == 0){
 $(window).unbind('scroll');
 $('#lblMessage').html('End of data...');
 setTimeout(function() {
 $('#lblMessage').fadeOut();
 }, 1500);
 }
 else {
 scrollHandler();
 }
 }
 });
 }
 else {
 isRunning = false; 
 $('.blur').removeClass('blur');
 }
};
" />
</Division>