Syncfusion.Grid.Windows
Members 


Syncfusion.Windows.Forms.Grid Namespace : GridSortColumnHeaderCellRenderer Class

GridSortColumnHeaderCellRenderer Class

Implements the renderer part of a column header with sort indicator.
Object Model
GridSortColumnHeaderCellRenderer ClassGridCurrentCell ClassGridStyleInfo ClassGridCellButton ClassIGridDropDownContainer InterfaceIGridDropDownCellImp InterfaceIGridDropDownCellImp InterfaceGridControlBase ClassGridCellModelBase ClassGridStyleInfo Class
Syntax
Remarks
The header cell is XP Themes enabled. It will be drawn themed if GridControlBase.ThemesEnabled is True.

The GridDataBoundGrid registers "ColumnHeaderCell" as identifier in GridStyleInfo.CellType of a cell's GridStyleInfo to associate this cell type with a cell.

The sort indicator is defined through the GridStyleInfo.Tag of a cell's GridStyleInfo. The GridStyleInfo.Tag will be cast to System.ComponentModel.ListSortDirection.

A renderer is created for each GridCellModelBase and GridControlBase. There can be several renderers associated with one GridSortColumnHeaderCellModel if several views display the same GridModel.

The following table lists some characteristics about the SortColumnHeader cell type:

Item Description
CellType SortColumnHeaderCell
Renderer GridSortColumnHeaderCellRenderer
Model GridSortColumnHeaderCellModel
XP Themes Support Yes
Interactive Click Only
Floating Support No
Base Type GridHeaderCellRenderer

The cell's behavior and appearance can be customized with the following properties of the GridStyleInfo class.

PropertyName Description
GridStyleInfo.BaseStyle (System.String) The base style for this style instance with default values for properties that are not initialized for this style object. (Default: String.Empty)
GridStyleInfo.Borders (GridBordersInfo) Top, left, bottom, and right border settings. (Default: GridBordersInfo.Default)
GridStyleInfo.CellAppearance (GridCellAppearance) When set to GridCellAppearance.Flat, the header will be drawn with slightly raised edges typical for cell headers. If the grid is XP Themes enabled, the headers will be drawn with XP Themes look. If you specify Sunken or Raised, the header will be drawn with sunken or raised edges and not XP Themed. (Default: GridCellAppearance.Flat)
GridStyleInfo.CellTipText (System.String) ToolTip text to be displayed when user hovers mouse over cell. (Default: String.Empty)
GridStyleInfo.CellType (System.String) ColumnHeaderCell (Default: Text Box)
GridStyleInfo.CellValue (System.Object) If empty, the standard header text will be drawn as specified with the GridModelOptions.NumberedRowHeaders and GridModelOptions.NumberedColHeaders properties in GridModel. If GridStyleInfo.CellValue is not NULL, the cell value will be displayed as header text. (Default: String.Empty)
GridStyleInfo.CellValueType (System.Type) Specifies the preferred System.Type for cell values. When you assign a value to the GridStyleInfo object, the value will be converted to this type. If the value cannot be converted, GridStyleInfo.Error will contain error information. (Default: NULL)
GridStyleInfo.CultureInfo (System.Globalization.CultureInfo) The culture information holds rules for parsing and formatting the cell's value. (Default: NULL)
GridStyleInfo.Enabled (System.Boolean) Specifies if the header cell can be activated as current cell when the user clicks onto the header. Usually you do not want a header to be activated as current cell unless you want to have editing capabilities such as allowing user to rename header text in place. (You would have to implement a custom header cell for this.) (Default: True)
GridStyleInfo.Error (System.String) Holds error information if a value could not be converted to the System.Type specified with GridStyleInfo.CellValueType. (Default: String.Empty)
GridStyleInfo.Font (GridFontInfo) The font for drawing text. (Default: GridFontInfo.Default)
GridStyleInfo.Format (System.String) Gets / sets the format mask for formatting the cell value. You can specify numeric format strings, date format strings, or enumeration format strings as discussed in the section "Format Specifiers and Format Providers" of the .NET Framework Developers Guide (see ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconformatspecifiersformatproviders.htm) (Default: String.Empty)
GridStyleInfo.HorizontalAlignment (GridHorizontalAlignment) Specifies horizontal alignment of text in the cell. (Default: GridHorizontalAlignment.Left)
GridStyleInfo.HotkeyPrefix (System.Drawing.Text.HotkeyPrefix) Specifies how hot-key prefixes should be displayed. Hot-keys are indicated in text with an '&' (ampersand). When you enable hot-key prefix, the specific characters can be displayed underlined or regular. The '&' will not be displayed. (Default: HotkeyPrefix.Show)
GridStyleInfo.ImageIndex (System.Int32) Specifies an index for an image in the GridStyleInfo.ImageList of a GridStyleInfo instance. (Default: -1)
GridStyleInfo.ImageList (System.Windows.Forms.ImageList) The GridStyleInfo.ImageList that holds a collection of images. Cells can choose images with the GridStyleInfo.ImageIndex property in a GridStyleInfo instance. (Default: NULL)
GridStyleInfo.Interior (Syncfusion.Drawing.BrushInfo) Lets you specify a solid backcolor, gradient, or pattern style with both back and forecolor for a cell's background. If grid is XP Themes enabled, this color will be ignored and the header will be drawn with default XP Themes header background. (Default: SystemColors.Window)
GridStyleInfo.MergeCell (GridMergeCellDirection) Specifies merge behavior for an individual cell when merging cells' features have been enabled in a GridModel with MergeCellsMode. (Default: GridMergeCellDirection.None)
GridStyleInfo.Tag (System.Object) The sort indicator is defined through the GridStyleInfo.Tag of a cell's GridStyleInfo. The GridStyleInfo.Tag will be cast to System.ComponentModel.ListSortDirection. (Default: NULL)
GridStyleInfo.Text (System.String) If empty, the standard header text will be drawn as specified with the GridModelOptions.NumberedRowHeaders and GridModelOptions.NumberedColHeaders properties in GridModel. If GridStyleInfo.CellValue is not NULL, the cell value will be displayed as header text. (Default: String.Empty)
GridStyleInfo.TextColor (System.Drawing.Color) Lets you specify the color for drawing the cell text. (Default: SystemColors.WindowText)
GridStyleInfo.TextMargins (GridMarginsInfo) Holds text margins in pixels. When drawing a cell, this specifies the empty area between the text rectangle and the client rectangle of the cell without borders and cell buttons. (Default: GridMarginsInfo.Default)
GridStyleInfo.Themed (System.Boolean) Specifies if cell should be drawn using Windows XP themes when GridControlBase.ThemesEnabled has been set. (Default: True)
GridStyleInfo.Trimming (System.Drawing.StringTrimming) Indicates how text is trimmed when it exceeds the edges of the cell text rectangle. (Default: StringTrimming.Character)
GridStyleInfo.VerticalAlignment (GridVerticalAlignment) Specifies vertical alignment of text in the cell. (Default: GridVerticalAlignment.Top)
GridStyleInfo.WrapText (System.Boolean) Specifies if text should be wrapped when it does not fit into a single line. (Default: true)

Inheritance Hierarchy

System.Object
   Syncfusion.ComponentModel.NonFinalizeDisposable
      Syncfusion.Windows.Forms.Grid.GridCellRendererBase
         Syncfusion.Windows.Forms.Grid.GridStaticCellRenderer
            Syncfusion.Windows.Forms.Grid.GridHeaderCellRenderer
               Syncfusion.Windows.Forms.Grid.GridSortColumnHeaderCellRenderer

AssemblyVersion

Syncfusion.Grid.Windows: 17.2460.0.46

See Also