MultiRow Windows Forms > Developer's Guide > Using MultiRow > Cell Types > HeaderCell |
The header cell offers features such as cell selection or resizing, caption display, and visual styles. You can use ColumnHeaderCell, RowHeaderCell, and CornerHeaderCell inherited from header cell to create a column header, row header, or corner header respectively.
In addition to the Base Cell features, the following features can also be used in a header cell.
For more details on each feature, refer to the HeaderCell class.
The header cell uses the Object value type and this type can be checked with the HeaderCell.ValueType property. The header caption uses a value that has been type cast to String type. This type can be checked by the HeaderCell.FormattedValueType property. You can modify the behavior at the time of type casting by overriding the ToString method of Object type. Use the HeaderCell.OnCellFormatting method to change behavior when a value is read into the cell. Override the HeaderCell.OnCellParsing method to change behavior when the value is written back from the cell.
The header cell does not provide a cell edit control. The HeaderCell.EditType property always returns a null reference (Nothing in Visual Basic).
The header cell supports following the members of the CellStyle class. You can set cell styles with the HeaderCell.Style property.
CellStyle Members | Enabled or Disabled |
BackColor | Enabled only when ModeHeaderCell.FlatStyle is other than System and HeaderCell.UseVisualStyleBackColor is False |
BackgroundGradientEffect | Enabled only when HeaderCell.FlatStyle is other than System and HeaderCell.UseVisualStyleBackColor is False. |
Border | Enabled |
DataSourceNullValue | Enabled |
DisabledBackColor | Enabled only when ModeHeaderCell.FlatStyle is other than System and HeaderCell.UseVisualStyleBackColor is False |
DisabledForeColor | Enabled |
DisabledGradientEffect | Enabled only when HeaderCell.FlatStyle is other than System and HeaderCell.UseVisualStyleBackColor is False. |
EditingBackColor | - |
EditingForeColor | - |
Font | Enabled |
ForeColor | Enabled |
Format | Enabled |
FormatProvider | Enabled |
Image | Enabled |
ImageAlign | Enabled |
ImeMode | - |
ImeSentenceMode | - |
InputScope | - |
LineAdjustment | Enabled only for GDI+Compatible Mode |
Margin | Enabled |
MouseOverBackColor | Enabled only when HeaderCell.FlatStyle is other than System and HeaderCell.UseVisualStyleBackColor is False. |
MouseOverForeColor | Enabled |
MouseOverGradientEffect | Enabled only when HeaderCell.FlatStyle is other than System and HeaderCell.UseVisualStyleBackColor is False. |
Multiline | Enabled |
NullValue | Enabled |
Padding | Enabled |
PatternColor | Enabled only when ModeHeaderCell.FlatStyle is other than System and HeaderCell.UseVisualStyleBackColor is False |
PatternStyle | Enabled only when ModeHeaderCell.FlatStyle is other than System and HeaderCell.UseVisualStyleBackColor is False |
SelectionBackColor | - |
SelectionForeColor | - |
SelectionGradientEffect | - |
Tag | Enabled |
TextAdjustment | Enabled only for GDI+Compatible Mode |
TextAlign | Enabled |
TextAngle | Enabled only for GDI+Compatible Mode |
TextEffect | Enabled |
TextImageRelation | Enabled |
TextIndent | Enabled |
TextVertical | Enabled only for GDI+Compatible Mode |
UseCompatibleTextRendering | Enabled |
WordWrap | Enabled |
To enable GDI+ Compatibility Mode, set the UseCompatibleTextRendering property to True.
Shortcut keys are not handled in header cells.
You can use the GcMultiRow.CellContentClick event to get a click in the cell content area. You can use the GcMultiRow.CellContentDoubleClick event for a double-click.