IDataGrid.Styles

Syntax

Styles: IDataGridStyles;

Description

The Styles property determines the collection of formatting styles used in the DataGrid component.

Example

Executing the example requires a form with the Button1 button and the DataGrid component named DataGrid1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

s:IDataGridStyle;

Begin

s := DataGrid1.Styles.Add;

s.BackgroundColor := GxColor.FromName("Red");

s.TextColor := GxColor.FromName("Green");

DataGrid1.Columns.Item(0).StyleIndex := 1;

End Sub Button1OnClick;

After the execution of the example, on clicking the Button1 button the formatting style is added to the table styles collection and is applied to the first table column.

See also:

IDataGrid