Hi ,
I have purchased the licensed version of pQ grid.
Before I am using PQ grid 1.1.3,the time it took to load the grid is far better than PQ3.0.0 version.
Here is my Code:
searchUsrGrid.pqGrid({
width: NMCApp.getSearchGridWidth(),
height: NMCApp.getSearchGridHeight(),
editable: false,
numberCell: false,
roundCorners: false,
wrap: false,
colModel: columnModel,
dataModel: { data: [] },
showTop: false,
showBottom: false,
scrollModel: { pace: 'consistent' },
hoverMode: 'row',
selectionModel: { type: 'row', mode: 'single' },
rowSelect: function (event, ui) {
try {
selectedUser = ui.rowData;
}
catch (error) {
NMCApp.showNMCExceptionWindow('Jquery Error:' + error);
}
},
});
function searchUsers() {
$.ajax({
type: 'GET',
url: searchUrl + '&skip=' + startIndex,
contentType: 'application/json; charset=utf-8',
dataType: 'json',
processdata: false,
cache: false,
success: function (data, textStatus, request) {
try{
for (var i = 0; i < data.length; i++) {
users.push(data);
}
if (data.length == NMCApp.getMaxSearchNumber() && NMCApp.isSearchCancelled() == false) {
searchUsrGrid.pqGrid("option", "dataModel.data", users);
model.numberOfUsers(users.length);
startIndex = startIndex + NMCApp.getMaxSearchNumber();
searchUsers();
}
else {
searchUsrGrid.pqGrid("option", "dataModel.data", users);
if (users.length > 0)
searchUsrGrid.pqGrid("setSelection", { rowIndx: 0 });
model.numberOfUsers(users.length);
if (NMCApp.isSearchCancelled() == false) {
NMCApp.hideLoadingWindow();
model.numberOfUsers(users.length);
}
else
model.numberOfUsers(users.length + ' (cancelled)');
}
searchUsrGrid.pqGrid("refreshDataAndView");
}
catch (error) {
NMCApp.showNMCExceptionWindow('Jquery Error:' + error);
}
},
error: function (request, status, error) {
NMCApp.hideLoadingWindow();
}
});
}
1)Can you please let me know why the latest version is taking more time to load data on to the grid.
For example: I am having 45,000 records to display on Grid.
with PQ 1.1.3, it is taking less time than 1:20
Where as with PQ 3.0.0, it is taking more than 4 min.
2)One more query,I am showing one loading windows when the data is getting loaded in to the gird.
In pQ 1.1.3,it is allowing user to can cancel the loading window.
In PQ 3.0.0,it is not allowing user to Cancel the loading window and the browser get hangs.
Could you please let me know how to resolve the aboe issues.