Gets the C1OlapFieldStyle used to display the field values on the grid.

Namespace:  C1.Olap
Assembly:  C1.Silverlight.Olap.5 (in C1.Silverlight.Olap.5.dll)

Syntax

C#
public C1OlapFieldStyle Style { get; }
Visual Basic
Public ReadOnly Property Style As C1OlapFieldStyle
	Get

Remarks

This property allows you to assign style properties to a specific C1OlapField, customizing the way the field values are displayed to the user.

Customizing the appearance of a field can be useful in views that contain multiple value fields.

For example, the code below creates a view with two value fields and gives one of the fields a green background:

Copy CodeC#
// create view
var olap = this.c1OlapPage1.OlapEngine;
olap.RowFields.Add("ProductName");
olap.ColumnFields.Add("Country");
olap.ValueFields.MaxItems = 2;
olap.ValueFields.Add("ExtendedPrice", "Freight");

// give the "ExtendedPrice" field a green background
var f = olap.Fields["ExtendedPrice"];
f.Style.BackColor = Color.FromArgb(240, 255, 240);

You can also create conditional styles using the StyleHigh and StyleLow properties.

See Also