Author Topic: CSS Examples as Titlecls and summarycls are not supported....  (Read 3563 times)

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
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.

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
Re: CSS Examples as Titlecls and summarycls are not supported....
« Reply #1 on: April 03, 2018, 05:52:13 pm »
More Specifically, alternate the row colors by the 1 column grouping.

Thank you !!!!

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
Re: CSS Examples as Titlecls and summarycls are not supported....
« Reply #2 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] + ";"};
         }
      },

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6125
    • View Profile
Re: CSS Examples as Titlecls and summarycls are not supported....
« Reply #3 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.

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
Re: CSS Examples as Titlecls and summarycls are not supported....
« Reply #4 on: April 03, 2018, 10:59:15 pm »
Perfect, working nice now...  Proof of Concept is coming together real nice..

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6125
    • View Profile
Re: CSS Examples as Titlecls and summarycls are not supported....
« Reply #5 on: April 04, 2018, 01:31:45 pm »
Sounds good.

rowInit & column.render usage is demonstrated here:

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