1
Help for ParamQuery Grid (free version) / Re: Error on Load Grid
« on: August 05, 2014, 07:48:35 am »
Hi, My issue was not solved yet.
I already remove all of properties that you said.
If the user clicks on menu and wait it to load, the error don't happens.
But, if click on menu and to click again before loaded completely the web browser shows the message below.
Uncaught Error: cannot call methods on pqScrollBar prior to initialization; attempted to call method 'option'
Code Sample
function LoadData(rota) {
var url = rota + "/LoadData";
var dataModel = {
location: "remote",
sorting: "remote",
paging: "remote",
dataType: "JSON",
method: "GET",
curPage: 1,
rPP: 20,
sortDir: "up",
rPPOptions: [5, 10, 20, 30, 40, 50, 100, 500],
filterIndx: "",
filterValue: "",
fields: itemsFilter,
getUrl: function () {
var sortDir = (this.sortDir == "up") ? "asc" : "desc";
if (this.sortIndx == null) {
this.sortIndx = "";
}
var queryString = "cur_page=" + this.curPage + "&records_per_page=" +
this.rPP + "&sortBy=" + this.sortIndx + "&dir=" + sortDir;
if (this.filterIndx != null && this.fields[this.filterIndx]) {
queryString += "&filterBy=" + this.fields[this.filterIndx] + "&filterValue=" + this.filterValue;
}
var obj = { url: url, data: queryString };
return obj;
},
getData: function (dataJSON) {
return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: dataJSON.data };
},
error: function (jqXHR, textStatus, errorThrown) {
alert(textStatus);
}
}
var obj = {
width: width, height: 400,
dataModel: dataModel,
colModel: colModel,
editable: false,
title: "Itens",
topVisible: true,
resizable: true,
columnBorders: true,
scrollModel: { horizontal: false }
};
var $grid = $("#grid_array").pqGrid(obj);
}
I already remove all of properties that you said.
If the user clicks on menu and wait it to load, the error don't happens.
But, if click on menu and to click again before loaded completely the web browser shows the message below.
Uncaught Error: cannot call methods on pqScrollBar prior to initialization; attempted to call method 'option'
Code Sample
function LoadData(rota) {
var url = rota + "/LoadData";
var dataModel = {
location: "remote",
sorting: "remote",
paging: "remote",
dataType: "JSON",
method: "GET",
curPage: 1,
rPP: 20,
sortDir: "up",
rPPOptions: [5, 10, 20, 30, 40, 50, 100, 500],
filterIndx: "",
filterValue: "",
fields: itemsFilter,
getUrl: function () {
var sortDir = (this.sortDir == "up") ? "asc" : "desc";
if (this.sortIndx == null) {
this.sortIndx = "";
}
var queryString = "cur_page=" + this.curPage + "&records_per_page=" +
this.rPP + "&sortBy=" + this.sortIndx + "&dir=" + sortDir;
if (this.filterIndx != null && this.fields[this.filterIndx]) {
queryString += "&filterBy=" + this.fields[this.filterIndx] + "&filterValue=" + this.filterValue;
}
var obj = { url: url, data: queryString };
return obj;
},
getData: function (dataJSON) {
return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: dataJSON.data };
},
error: function (jqXHR, textStatus, errorThrown) {
alert(textStatus);
}
}
var obj = {
width: width, height: 400,
dataModel: dataModel,
colModel: colModel,
editable: false,
title: "Itens",
topVisible: true,
resizable: true,
columnBorders: true,
scrollModel: { horizontal: false }
};
var $grid = $("#grid_array").pqGrid(obj);
}