ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: ketkigaur on March 16, 2021, 10:09:16 pm

Title: setting color of nested grid
Post by: ketkigaur on March 16, 2021, 10:09:16 pm
HI,

Can you please share some demo on how to set colors of a nested grid dynamically. I am using rowinit method to set color of main grid but it doesnt work for a nested grid.
Title: Re: setting color of nested grid
Post by: paramvir on March 16, 2021, 10:20:38 pm
rowInit of main grid works for rows in main grid only.

To change style of rows in detail grid, please implement rowInit of detail grid.
Title: Re: setting color of nested grid
Post by: ketkigaur on March 16, 2021, 10:56:57 pm
Hi,
As mentioned earlier, I have tried rowInit for detail grid but that didnt work.
 Is there anything different in way the style needs to be set in rowInit method for detail grid. Can you share an example?
Title: Re: setting color of nested grid
Post by: paramvir on March 16, 2021, 11:16:10 pm
Please check this example for setting text-color of the rows to red in detail grid.

https://jsfiddle.net/jb0gv389/

Code: [Select]
rowInit: function(ui){
  return {
    style: "color:red;"
  }
},
Title: Re: setting color of nested grid
Post by: ketkigaur on March 17, 2021, 03:06:25 am
Thank you. I was able to implement styling dynamically using this.