1
Help for ParamQuery Grid (free version) / Checkbox in header is not visible when location is remote
« on: February 16, 2016, 02:46:10 pm »
I fetch the data from a remote location,
I Have a bool column SelectUser where type:CheckboxSelection, and i have also set
cbHeader: true, cbAll: true to get the checkbox in header.
var colM = [
{ title: "", width: 0, dataIndx: "UserId", hidden: true },
{ title: "", dataType: "bool", dataIndx: "SelectUser", width: 30, align: "center", type: 'checkBoxSelection' },
{ title: "Name", width: 150, dataIndx: "Name" },
{ title: "Username", width: 200, dataIndx: "UserName" },
{ title: "Email Id", width: 200, dataIndx: "EmailId" }
];
//Define DataModel
var dataModel = {
location: "remote",
sorting: "local",
dataType: "JSON",
sortIndx: "Name",
sortDir: "down",
method: "GET",
data: { searchString: $("#txtSearch").val() },
url: $("#txtSearch").data('request-url'),
getData: function (dataJSON) {
return { data: dataJSON.data };
}
};
var grid = $gridId.pqGrid({
width: $('.inner-body-content').innerWidth() - 30,
height: 400,
editable: false,
collapsible: false,
columnBorders: false,
pageModel: { type: "local", rPP: 10, strRpp: "{0}", strDisplay: "{0} - {1} of {2}" },
selectionModel: { type: 'none', subtype: 'incr', cbHeader: true, cbAll: true },
dataModel: dataModel,
colModel: colM,
wrap: false, hwrap: false,
numberCell: { show: false },
showTitle: false,
wrap: true,
}
With the above code the check-box in the header is not visible
and also if select any checkbox in a row i will get the below error
Uncaught TypeError: Cannot read property 'pqval' of undefined
--------------------------------------
this.$inp.pqval({
val: val
------------------------------------------------------
I Have a bool column SelectUser where type:CheckboxSelection, and i have also set
cbHeader: true, cbAll: true to get the checkbox in header.
var colM = [
{ title: "", width: 0, dataIndx: "UserId", hidden: true },
{ title: "", dataType: "bool", dataIndx: "SelectUser", width: 30, align: "center", type: 'checkBoxSelection' },
{ title: "Name", width: 150, dataIndx: "Name" },
{ title: "Username", width: 200, dataIndx: "UserName" },
{ title: "Email Id", width: 200, dataIndx: "EmailId" }
];
//Define DataModel
var dataModel = {
location: "remote",
sorting: "local",
dataType: "JSON",
sortIndx: "Name",
sortDir: "down",
method: "GET",
data: { searchString: $("#txtSearch").val() },
url: $("#txtSearch").data('request-url'),
getData: function (dataJSON) {
return { data: dataJSON.data };
}
};
var grid = $gridId.pqGrid({
width: $('.inner-body-content').innerWidth() - 30,
height: 400,
editable: false,
collapsible: false,
columnBorders: false,
pageModel: { type: "local", rPP: 10, strRpp: "{0}", strDisplay: "{0} - {1} of {2}" },
selectionModel: { type: 'none', subtype: 'incr', cbHeader: true, cbAll: true },
dataModel: dataModel,
colModel: colM,
wrap: false, hwrap: false,
numberCell: { show: false },
showTitle: false,
wrap: true,
}
With the above code the check-box in the header is not visible
and also if select any checkbox in a row i will get the below error
Uncaught TypeError: Cannot read property 'pqval' of undefined
--------------------------------------
this.$inp.pqval({
val: val
------------------------------------------------------