GrapeCity MultiRow Windows Forms Documentation
Rules for Applying Styles

Row Cell Style

The style for the cells in the row is applied using the following steps at runtime. The priority increases as the number increases.

  1. Default cell style for the GcMultiRow control (GcMultiRow.DefaultCellStyle)

  2. Default Row Style (GcMultiRow.RowsDefaultCellStyle)

  3. Default Style for Alternating Rows (GcMultiRow.AlternatingRowsDefaultCellStyle)

  4. Default Style for Each Row (Row.DefaultCellStyle)

  5. Style of Each Cell (Cell.Style)

When the style properties are not set, the properties one level up are inherited. For example, when the background color of the cell is set in the default style of GcMultiRow control, and there are no background colors set in the styles after that, the backcolor of the default style of the GcMultiRow control is set into the cells. If the backcolor is set into the styles after that, that backcolor is overwritten. You can confirm the style that has been applied to the cells at runtime by checking the Cell.InheritedStyle property.

Using Code

This example gets the backcolor style.

[VB]

Imports GrapeCity.Win.MultiRow

Dim style As CellStyle = GcMultiRow1.Rows(0).Cells(0).InherittedStyle
Console.WriteLine(style.BackColor)

[CS]

using GrapeCity.Win.MultiRow;

CellStyle style = gcMultiRow1.Rows[0].Cells[0].InherittedStyle;
Console.WriteLine(style.BackColor);

Column Header and Footer Cell Styles

The cell styles for column headers and footers are applied at runtime, in the following order. The rules of priority and inheritance are the same as those for cell styles.

  1. GcMultiRow Control Default Style (GcMultiRow.DefaultCellStyle)

    Control Default Style

  2. The default header style of the column header (GcMultiRow.ColumnHeadersDefaultHeaderCellStyle) or default header style of the column footer (GcMultiRow.ColumnFootersDefaultHeaderCellStyle)

    Default style of column header

  3. Style of each Header Cell (HeaderCell.Style)

See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options