MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Styles > Rules for Applying Styles |
The style for the cells in the row is applied using the following steps at runtime. The priority increases as the number increases.
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.
This example gets the backcolor style.
Imports GrapeCity.Win.MultiRow Dim style As CellStyle = GcMultiRow1.Rows(0).Cells(0).InherittedStyle Console.WriteLine(style.BackColor) |
using GrapeCity.Win.MultiRow; CellStyle style = gcMultiRow1.Rows[0].Cells[0].InherittedStyle; Console.WriteLine(style.BackColor); |
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.