Changing the text font color of table row based on property in data model

0
shardaiyer@bakerhughes.com posted this 24 November 2020

Hi,

I am displaying a list of objects inside a table as under NodeName|NodePath|Status

I wanted to change the font color of row based on Status( approved/ notapproved) Is there any way to do it?

1 Posts
1 Points
2 Comments
Order By: Standard | Newest | Votes
0
jles posted this 26 November 2020

Hi,

Yes, you can use Visual Format Overrides feature. You can set-up a rule that will change Text Color based on some criteria. You will need to set 3 items: - Target Object: you will need to select "Table Row". - Visual Property: you need to select "Text Color" - Binding: for this you will need to enter an expression that returns a string representing a hex color (e.g., #FF0000, or 'Red'). The Binding part might be tricky if you are using .NET Object data sources since you cannot write expressions: you will need to have a property that returns a color string value. If you are using XML data sources, then you can use a the 'iif()' function: iif(@Status = 'something', 'Red', 'Black')

Let me know if this helps.

Regards, Jure

134 Posts
261 Points
0
jles posted this 27 November 2020

Please also read this article: https://blog.docentric.com/2017/03/01/docentric-toolkit-5-0-released/

Best regards, Jure

Last edited 27 November 2020

134 Posts
261 Points

Our 50242 members have posted 299 times in 88 discussions