ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: mercury85 on April 03, 2018, 12:39:57 pm
-
groupModel.titleCls and groupModel.summaryCls are unsupported. Instead use rowInit and column.render to inject classes
I am wondering if there are any examples for the new options. Looking thru all the examples, and I do not see color unless it is on the old demos.
-
More Specifically, alternate the row colors by the 1 column grouping.
Thank you !!!!
-
Update**
I followed this thinking it was similar...
https://paramquery.com/pro/demos/treegrid
I looked at this example on your treeview, looks good. ran debugger and it assigned all the values accordingly but thinking it did not work because the columns are hidden and the one column grouping is the only item showing...
stripeRows: false,
rowInit: function(ui){
var rd = ui.rowData, color = ["lightyellow","lightgreen","pink","lightblue"];
if( rd.pq_gsummary ){
return {style:"background:" + color[rd.pq_level] + ";"};
}
},
-
you got it right. it should work for grouping too as both share same method of adding styles/ css via column.render or rowInit.
Also both add pq_level properties to the rowData.
-
Perfect, working nice now... Proof of Concept is coming together real nice..
-
Sounds good.
rowInit & column.render usage is demonstrated here:
https://paramquery.com/pro/demos/condition_style