Highlight Datagrid Row

0
Hello, I am trying here I was take one datagrid. In this datagrid there is one  marks (Integer) column so  iI try to show Odd Number and even number have diffrent background colour . so how can  do this.
asked
1 answers
1

Hi Rushikesh,

 

are you using datagrid or datagrid2?

I would use something like this in the dynamic classes section:

if ${your value} div 2 = round(${your value} div 2)

 then ‘Place class for even’

else ‘Place class for odd’

 

If you use datagrid you can try and see if this widget still works: Grid cell styler

In datagrid2 you can style the cell by using the custom format.

Like this example (image is from the marketplace module), on the right you can see that you have the option to define styling and conditional visibility

 

Image

answered