ParamQuery grid support forum

General Category => ParamQuery Pro Evaluation Support => Topic started by: mercury85 on April 03, 2018, 12:39:57 pm

Title: CSS Examples as Titlecls and summarycls are not supported....
Post 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.
Title: Re: CSS Examples as Titlecls and summarycls are not supported....
Post by: mercury85 on April 03, 2018, 05:52:13 pm
More Specifically, alternate the row colors by the 1 column grouping.

Thank you !!!!
Title: Re: CSS Examples as Titlecls and summarycls are not supported....
Post by: mercury85 on April 03, 2018, 09:18:18 pm
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] + ";"};
         }
      },
Title: Re: CSS Examples as Titlecls and summarycls are not supported....
Post by: paramvir on April 03, 2018, 10:23:04 pm
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.
Title: Re: CSS Examples as Titlecls and summarycls are not supported....
Post by: mercury85 on April 03, 2018, 10:59:15 pm
Perfect, working nice now...  Proof of Concept is coming together real nice..
Title: Re: CSS Examples as Titlecls and summarycls are not supported....
Post by: paramvir on April 04, 2018, 01:31:45 pm
Sounds good.

rowInit & column.render usage is demonstrated here:

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