Skip to main content
10-Marble
April 8, 2021
Solved

Highlighting Empty rows of grid

  • April 8, 2021
  • 1 reply
  • 1556 views

Hi,

 

I want to Highlight Empty rows of Advanced grid widget in red color.

I wrote state definition for this and give it to Row Format property of grid but it applying to all  grid rows.

 

Please let me know how to resolve this.

 

Thanks!

 

Best answer by cmorfin

Hi @Pallavi_374858 

 

Here are 2 approach that could help:

 

- option1

add a new column to the grid that will be hidden for display

populate this column with a specific string (for example "empty") for the rows that are empty - this will require to write a service that scan the values before populating the grid.

Apply a state definition for the rows that have "empty" in that hidden column

 

-option 2

If some of the columns are of type number, define a state definition with default state being the red state for empty column, then an other state for <numeric column value>  less than <a value higher than the max possible>

Apply that state to the rowFormat property. every rows with a value will have the second state while the one with no value will get the default state.

 

Hope this helps

Christophe

 

1 reply

cmorfin19-TanzaniteAnswer
19-Tanzanite
April 8, 2021

Hi @Pallavi_374858 

 

Here are 2 approach that could help:

 

- option1

add a new column to the grid that will be hidden for display

populate this column with a specific string (for example "empty") for the rows that are empty - this will require to write a service that scan the values before populating the grid.

Apply a state definition for the rows that have "empty" in that hidden column

 

-option 2

If some of the columns are of type number, define a state definition with default state being the red state for empty column, then an other state for <numeric column value>  less than <a value higher than the max possible>

Apply that state to the rowFormat property. every rows with a value will have the second state while the one with no value will get the default state.

 

Hope this helps

Christophe

 

10-Marble
April 12, 2021

Hi Christophe,

 

Option1 is worked for me.

It will not work, only if "empty" string present in table.

So, added a column with Boolean basetype.

 

Thanks for the help!

Pallavi

 

19-Tanzanite
April 12, 2021

@Pallavi_374858 

Thank you I am pleased that it was helpful.

Would you mind marking the response as correct answer as this will helps other to find the solution ?

 

Thank you

Kind regards

Christophe