ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: Soumya on February 12, 2014, 11:53:56 pm
-
Is it possible to include two check box columns in the column model?
right now i am able to add only on check box column.
var colM = [
{ title: "InvestmentID", width: 60, dataIndx: "InvestmentID" },
{ title: "Fund Name", width: 320, dataIndx: "FundName" },
{ title: "Company FundCode", width: 120, dataIndx: "CompanyFundCode" },
{ title: "Amount", width: 120, dataIndx: "AUM", dataType: "decimal" },
{ title: "Fund Characteristics", width: 110, dataIndx: "FundCharacteristic", dataType: "string" },
{ title: "IsSuspenseFund", dataIndx: "IsSuspenseFund", width: 50, align: "center", type: 'checkBoxSelection', cls: 'checkboxColumn', resizable: false },
{ title: "QDIA", dataIndx: "IsQDIA", width: 30, align: "center", type: 'checkBoxSelection', cls: 'checkboxColumn', resizable: false }
];
Below is the error i get when using 2 check box columns in one PQGrid
Uncaught TypeError: Cannot set property 'IsSuspenseFund' of undefined .
-
It's possible to include any number of checkboxes but only column should have type: 'checkBoxSelection'.
The other columns (other than type: 'checkBoxSelection') should use render function to display checkboxes.
render: function (ui){
if(ui.cellData){//true
return "<input type=checkbox checked=checked />";
}
else{
return "<input type=checkbox />";
}
}