.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

Table.ShowTableStyleFirstColumn Property

Indicates whether special formatting should be applied to the first column of the table.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v19.2.Core.dll

Declaration

bool ShowTableStyleFirstColumn { get; set; }
Property ShowTableStyleFirstColumn As Boolean
bool ShowTableStyleFirstColumn { get; set; }
Property ShowTableStyleFirstColumn As Boolean
bool ShowTableStyleFirstColumn { get; set; }
Property ShowTableStyleFirstColumn As Boolean

Property Value

Type Description
Boolean

true, to apply special formatting to the first column of the table; otherwise, false.

Property Value

Type Description
Boolean

true, to apply special formatting to the first column of the table; otherwise, false.

Property Value

Type Description
Boolean

true, to apply special formatting to the first column of the table; otherwise, false.

Remarks

If the ShowTableStyleFirstColumn property is set to true, the appearance of the table's first column is specified by the following elements of the style applied to the table.

If the ShowTableStyleFirstColumn property is set to false, the first table is formated identically to the other columns of the table.

The following example demonstrates the creation of a table style with special formatting for the table's first column and how to apply this formatting to the table.


using DevExpress.Spreadsheet;
// ...

TableStyle tableStyle = workbook.TableStyles[BuiltInTableStyleId.TableStyleLight15].Duplicate();

tableStyle.BeginUpdate();
try {
    TableStyleElements tbstElements = tableStyle.TableStyleElements;

    tbstElements[TableStyleElementType.FirstColumn].Fill.BackgroundColor = Color.FromArgb(248, 164, 94);
    tbstElements[TableStyleElementType.FirstColumn].Borders.SetAllBorders(Color.FromArgb(151, 71, 6), BorderLineStyle.Thin);
    tbstElements[TableStyleElementType.FirstHeaderCell].Fill.BackgroundColor = Color.FromArgb(252, 213, 180);
    tbstElements[TableStyleElementType.FirstTotalCell].Fill.BackgroundColor = Color.FromArgb(244, 117, 12);
}
finally {
    tableStyle.EndUpdate();
}

Table newTable = workbook.Worksheets.ActiveWorksheet.Tables.Add(spreadsheetControl1.Selection, true);
newTable.Style = tableStyle;

newTable.ShowTableStyleFirstColumn = true;

SpreadsheetControl_ShowTableStyleFirstColumn

See Also