How to prevent new request while large dataset loads?
How to prevent new request while large dataset loads?

During loading of large dataset, if user changes a filter or does a name search, it crashes the site.
function CreateUserTabe() {
$('#UserTable').dataTable({
columns: [
{ 'data': 'FirstName' },
{ 'data': 'LastName' },
{ 'data': 'Active' },
{ 'defaultContent': '<button type="button" class="btn btn-primary" onclick="ManageUser(this)">Manage</button>' }
],
serverSide: true,
processing: true,
language: {
processing: '<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i><span class="sr-only">Loading...</span>'
},
ajaxSource: 'UsersDataHandler.ashx',
rowId: 'UserId',
select: true,
deferRender: true
});
}
This discussion has been closed.
Answers
Hi @kgomez ,
The dataset should be very small in this example, as you have
serverSide
enabled, only the rows on the current page should be being returned. On thing to note is thatajaxSource
is obsolete, you should useajax
now.We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin