IEaxGridViewSettings.GetStyleSettings

Fore Syntax

GetStyleSettings(Value: IDataAreaHeaderStyleSettingsBase): IEaxDataAreaCellStyle;

Fore.NET Syntax

GetStyleSettings[Value: Prognoz.Platform.Interop.ForeSystem.IDataAreaHeaderStyleSettingsBase]: Prognoz.Platform.Interop.Express.EaxDataAreaCellStyle;

Parameters

Value. Header element, for which display settings should be obtained.

Description

The GetStyleSettings property returns style formatting settings for the specified header element.

Comments

The following elements can be specified as value of the Value parameter:

Fore Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. The data source calendar dimension has the CALENDAR identifier and is located in columns in the reportLink the Drawing, Express, System, Metabase, Pivot, Tab system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Pivot: IPivot;
    PivotDim: IPivotDimension;
    Grid: IEaxGrid;
    CellStyle: IEaxDataAreaCellStyle;
    HeaderStyle: ITabCellStyle;
    DimKey: Integer;
Begin
    MB := MetabaseClass.Active;
    // Express report
    Express := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    Pivot := Express.Pivot;
    // Calendar dimension
    DimKey := Pivot.Selection.FindById("CALENDAR").Dimension.Key;
    PivotDim := Pivot.Dimensions.FindByKey(DimKey);
    Grid := Express.Grid;
    CellStyle := Grid.ViewSettings.GetStyleSettings(PivotDim As IDataAreaHeaderStyleSettingsBase);
    // Formatting style
    HeaderStyle := Grid.Style.TopHeaderStyle;
    HeaderStyle.Font.Bold := TriState.OnOption;
    HeaderStyle.BackgroundBrush := New GxSolidBrush.Create(GxColor.FromKnownColor(GxKnownColor.YellowGreen));
    // Apply style
    CellStyle.Header := HeaderStyle;
    // Save report
    (Express As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the formatting style will be changed for cells placed in the column titles of the express report.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.ForeSystem;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Pivot;
Imports Prognoz.Platform.Interop.Tab;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Express: IEaxAnalyzer;
    Pivot: IPivot;
    PivotDim: IPivotDimension;
    Grid: IEaxGrid;
    CellStyle: IEaxDataAreaCellStyle;
    GxColorCls: GxColorClass = New GxColorClassClass();
    GxSolidBrushCls: GxSolidBrush = New GxSolidBrushClass();
    HeaderStyle: TabCellStyle;
    DimKey: UInteger;
Begin
    MB := Params.Metabase;
    // Express report
    Express := MB.ItemById["EXPRESS_REPORT"].Edit() As IEaxAnalyzer;
    Pivot := Express.Pivot;
    // Calendar dimension
    DimKey := Pivot.Selection.FindById("CALENDAR").Dimension.Key;
    PivotDim := Pivot.Dimensions.FindByKey(DimKey);
    Grid := Express.Grid;
    CellStyle := Grid.ViewSettings.GetStyleSettings[PivotDim As IDataAreaHeaderStyleSettingsBase];
    // Formatting style
    HeaderStyle := Grid.Style.TopHeaderStyle;
    HeaderStyle.Font.Bold := TriState.tsOnOption;
    GxSolidBrushCls.Create(GxColorCls.FromKnownColor(GxKnownColor.clYellowGreen));
    HeaderStyle.BackgroundBrush := GxSolidBrushCls;
    // Apply style
    CellStyle.Header := HeaderStyle;
    // Save report
    (Express As IMetabaseObject).Save();
End Sub;

See also:

IEaxGridViewSettings