C1.Olap Namespace > C1OlapField Class : StyleHigh Property |
'Declaration
Public ReadOnly Property StyleHigh As C1OlapConditionalFieldStyle
'Usage
Dim instance As C1OlapField Dim value As C1OlapConditionalFieldStyle value = instance.StyleHigh
public C1OlapConditionalFieldStyle StyleHigh {get;}
public read-only property StyleHigh: C1OlapConditionalFieldStyle;
public function get StyleHigh : C1OlapConditionalFieldStyle
public: __property C1OlapConditionalFieldStyle* get_StyleHigh();
public: property C1OlapConditionalFieldStyle^ StyleHigh { C1OlapConditionalFieldStyle^ get(); }
This property allows you to apply conditional formatting to a field, making certain values stand out when displayed on to the user.
For example, the code below shows values in the top 10% range in bold with a green background and values in the bottom 10% range in bold with a red background:
// apply formatting to all value fields var olap = this.c1OlapPage1.OlapEngine; foreach (var f in olap.ValueFields) { // show top 10% values in green, bold var sh = f.StyleHigh; sh.ConditionType = C1.Olap.ConditionType.Percentage; sh.Value = .9; sh.BackColor = Color.FromArgb(210, 255, 210); sh.FontBold = true; // show bottom 10% values in red, bold var sl = f.StyleLow; sl.ConditionType = C1.Olap.ConditionType.Percentage; sl.Value = .1; sl.BackColor = Color.FromArgb(255, 210, 210); sl.FontBold = true; }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2