cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Highlighting Empty rows of grid

Pallavi
6-Contributor

Highlighting Empty rows of grid

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!

 

ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:Pallavi)

Hi @Pallavi 

 

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

 

View solution in original post

3 REPLIES 3
cmorfin
19-Tanzanite
(To:Pallavi)

Hi @Pallavi 

 

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

 

Pallavi
6-Contributor
(To:cmorfin)

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

 

cmorfin
19-Tanzanite
(To:Pallavi)

@Pallavi 

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

 

Announcements


Top Tags