Syncfusion.Windows.Forms.Grid Namespace : GridCheckBoxCellRenderer Class

GridCheckBoxCellRenderer Class

Implements the renderer part for a check box cell.
Object Model
GridCheckBoxCellRenderer ClassGridCurrentCell ClassGridStyleInfo ClassGridCellButton ClassIGridDropDownContainer InterfaceIGridDropDownCellImp InterfaceIGridDropDownCellImp InterfaceGridControlBase ClassGridCellModelBase ClassGridStyleInfo Class
A GridCheckBoxCellRenderer cell's behavior can be customized with the GridStyleInfo.CheckBoxOptions property of a GridStyleInfo instance where you can specify values for Checked, Unchecked, and Indeterminate. The GridStyleInfo.TriState property of a GridStyleInfo instance lets you toggle tri-state behavior for the cell.

The check box cell is XP Themes enabled. It will be drawn themed if GridControlBase.ThemesEnabled is True.

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

Use "Check Box" as identifier in GridStyleInfo.CellType of a cell's GridStyleInfo to associate this cell type with a cell.

The following table lists some characteristics about the Check Box cell type:

Item Description
CellType Check Box
Renderer GridCheckBoxCellRenderer
Model GridCheckBoxCellModel
XP Themes Support Yes
Interactive Edit with Mouse Click or SpaceBar
Floating Support Floating
Base Type GridCellRendererBase

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) Specifies if cell edges shall be drawn raised, sunken, or flat (default). (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) Check Box (Default: Text Box)
GridStyleInfo.CellValue (System.Object) The cell value should match one of the values of GridCheckBoxCellInfo. (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.CheckBoxOptions (GridCheckBoxCellInfo) Gets / sets flat look and values that represent checked, unchecked, and indeterminate state of the check box. (Default: NULL)
GridStyleInfo.Description (System.String) Gets / sets the text that is shown in the check box. (Default: String.Empty)
GridStyleInfo.Enabled (System.Boolean) Specifies if the cell can be activated as current cell or if cell should be skipped when moving the current cell. When disabled, the check box will be drawn grayed out. (Default: True)
GridStyleInfo.Font (GridFontInfo) The font for drawing text. (Default: GridFontInfo.Default)
GridStyleInfo.HorizontalAlignment (GridHorizontalAlignment) Specifies horizontal alignment of text and the checkbox 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. The GridStyleInfo.Description of a check box can have hotkeys. (Default: HotkeyPrefix.Show)
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. (Default: SystemColors.Window)
GridStyleInfo.MaskEdit (GridMaskEditInfo) Gets / sets MaskedEdit state. MaskedEdit is itself an expandable object with several properties that can be set individually and participate in style inheritance mechanism. (Default: GridMaskEditInfo.Default)
GridStyleInfo.ReadOnly (System.Boolean) Specifies if cell contents can be modified by the user. You can programmatically change Read-only cells by setting GridModel.DiscardReadOnly to True. (Default: False)
GridStyleInfo.Text (System.String) Gets / sets the value as a string. If a GridStyleInfo.CellValueType is specified, the text will be parsed and converted to the type specified with GridStyleInfo.CellValueType using any GridStyleInfo.CultureInfo information. The cell value should match one of the values provided by GridCheckBoxCellInfo. (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 including the check box and the borders of the cell. (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.TriState (System.Boolean) Specifies if this is a Tristate check box that has an additional indeterminate state. (Default: False)
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 and the check box in the cell. (Default: GridVerticalAlignment.Top)
GridStyleInfo.WrapText (System.Boolean) Specifies if the GridStyleInfo.Description text should be wrapped when it does not fit into a single line. (Default: True)

Inheritance Hierarchy



Syncfusion.Grid.Windows: 17.1460.0.47

See Also