Welcome Guest Search | Active Topics | Sign In | Register

Grid - Conditional Formatting Options
Jay Mitchusson
Posted: Tuesday, November 15, 2011 2:01:36 PM
Rank: Newbie
Groups: Member

Joined: 2/9/2011
Posts: 2
Any way to have conditonal formatting for more than one condition? I want to have different colors for rows in a grid for multiple conditioins. For example, if a Status field has a value of "Hold" I want the rows to be yellow and if a Status field has a value of "Completed" I want the rows to be red and so on...
eo_support
Posted: Tuesday, November 15, 2011 2:21:53 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You will have to have the "computed column" in you data source that reflects the final value of the style. The Grid only takes one value. So whatever computation has to be done before you pass it to the Grid.

Thanks!
Jay Mitchusson
Posted: Tuesday, November 15, 2011 3:02:06 PM
Rank: Newbie
Groups: Member

Joined: 2/9/2011
Posts: 2
So, I can't have multiple conditions reflected for grid rows?
eo_support
Posted: Tuesday, November 15, 2011 3:13:16 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
You can. You just have to figure out a single final value based on your whatever conditions. For example, for your original sample, if you pass the value of you Status Field to the Grid directly, then the Grid row will have style "Hold" when the status is "Hold" and style "Completed" if status is "Completed". Whatever value the Grid got is directly mapped to your CSS rules. So for example, if you have a CSS rule "Hold" that is defined as "color: yellow", then the row with style value "Hold" will be yellow. If you do not have a CSS rule "Hold" but instead of "yellow_text", then you will have to pass "yellow_text" to the Grid, how to translate your database value "Hold" into CSS rule name "yellow_text" will be completely up to you.

The idea is the Grid doesn't care how many different status you have or where that status comes from. It interprets whatever you pass to it as a CSS style name and apply it directly. Just like regular CSS rule, there is no limit on how many different rules you can have.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.