I am trying to implement lazy loader in JQuery Data Table but I am not able to implement it after
I am trying to implement lazy loader in JQuery Data Table but I am not able to implement it after
UmangSawaria
Posts: 1Questions: 1Answers: 0
I am trying to implement Lazy loader in Jquery Data Table but it is not working I have tried with deferRender and deferLoading but it is not working. I have to load at a time 50,000 records it gives me DataTable warning.
$('#grdPatientDetails').DataTable({
"deferRender": true,
"deferLoading": 10,
"ajax": {
"url": "/LazyLoader/GetPatientDetails",
"type": "GET",
"datatype": "json"
},
"columns": [
{ "data": "PatientId", "autoWidth": true, "sortable": true, "class": "hidden" },
{
"data": "PatientName", "autoWidth": true, "sortable": true, "visible": true
},
{ "data": "PatientDOB", "autoWidth": true, "sortable": true, "visible": true },
{ "data": "PatientGenderName", "autoWidth": true, "sortable": true, "visible": true },
{ "data": "PatientBGName", "autoWidth": true, "sortable": true, "visible": true },
{ "data": "PatientMaritalStatusName", "autoWidth": true, "sortable": true, "visible": true },
{ "data": "PatientMobileNo", "autoWidth": true, "sortable": true, "visible": true },
{ "data": "PatientEmailId", "autoWidth": true, "sortable": true, "visible": true }
]
});
Please refer to the code for more details.
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
Answers
What is the warning?
Datatables provides Server Side Processing if the 50,000 rows are too much to be loaded at one time. Your server script will need to support the Server Side Processing Protocol.
Kevin