is there any way to set lazy loading like below code
<below code : occur error>
Uncaught TypeError: Cannot read properties of undefined (reading 'init')
at A.refreshDataAndView (pqgrid.min.js:9:66261)
at doSearch (sample03.js:83:10)
at HTMLDocument.<anonymous> (sample03.js:5:5)
at j (jquery.min.js:2:29999)
at k (jquery.min.js:2:30313)
############################################
var grid;
$(document).ready(function() {
initGrid();
doSearch();
});
function initGrid() {
var obj = {
numberCell: { width: 60 },
title: "Background loading of data",
resizable: true,
pageModel: { rPP: 150 },
colModel: [
{ dataIndx: 'athlete', title: 'Athlete' },
{ dataIndx: 'age', dataType: 'integer', title: 'Age' },
{ dataIndx: 'country', title: 'Country' },
{ dataIndx: 'year', dataType: 'integer', title: 'Year' },
{ dataIndx: 'date', dataType: 'date', title: 'Date' },
{ dataIndx: 'sport', title: 'Sport' },
{ dataIndx: 'gold', dataType: 'integer', title: 'Gold' },
{ dataIndx: 'silver', dataType: 'integer', title: 'Silver' },
{ dataIndx: 'bronze', dataType: 'integer', title: 'Bronze' },
{ dataIndx: 'total', dataType: 'integer', title: 'Total' }
]
};
grid = pq.grid("#pqgrid", obj);
}
function doSearch() {
grid.option( {dataModel : {location:"lazy", data:[], url:"
https://paramquery.com/pro/Olympics"}} );
grid.option( {pageModel : { rPP: 150 }} );
grid.refreshDataAndView();
}