ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: hirehop on November 20, 2023, 09:27:43 pm

Title: ColModel return object
Post by: hirehop on November 20, 2023, 09:27:43 pm
In column model
Code: [Select]
filter: {                     
crules: [{condition: 'range'}],
gridOptions: {
stripeRows: false,
filterModel: {header: false}
},
options: [                 
{"": lang.allTxt},
{"0:1": "days <= 1"},
{"1:7": "1 < days <= 7"},
{"7:14": "7 < days <= 14"},
{"14:21": "14 < days <= 21"},
{"21:30": "21 < days <= 30"}
],
//override range compare.
conditions: {
range: {
compare: function (cellData, val) {
console.log("cellData", cellData, "val", val);
return true;
}
}
}
}

If cellData is an object it returns a [OBJECT OBJECT] (see red)....
Title: Re: ColModel return object
Post by: paramvir on November 21, 2023, 11:12:03 am
That's correct, object remains an object in cellData.

Please check this example for how to deal with object cell data.

https://paramquery.com/pro/demos/json_nested