WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridCheckBoxCellRenderer - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridCheckBoxCellRenderer

    Implements the renderer part for a check box cell.

    Inheritance
    System.Object
    NonFinalizeDisposable
    GridCellRendererBase
    GridCheckBoxCellRenderer
    Implements
    IQueryFocusInside
    IGridDropDownCell
    IPopupParent
    IPopupItem
    System.IDisposable
    Inherited Members
    GridCellRendererBase.Dispose()
    GridCellRendererBase.ProcessMouseWheel(MouseEventArgs)
    GridCellRendererBase.GetEditState()
    GridCellRendererBase.SetEditState(Object)
    GridCellRendererBase.ToString()
    GridCellRendererBase.OnDeleting()
    GridCellRendererBase.UnwireModel(GridCellModelBase)
    GridCellRendererBase.WireModel(GridCellModelBase)
    GridCellRendererBase.OnModelChanged(EventArgs)
    GridCellRendererBase.OnDeactivating()
    GridCellRendererBase.OnDeactived(Int32, Int32)
    GridCellRendererBase.OnBeginEdit()
    GridCellRendererBase.OnEndEdit()
    GridCellRendererBase.QueryFocusInside()
    GridCellRendererBase.OnHasFocusControlChanged()
    GridCellRendererBase.OnRejectChanges()
    GridCellRendererBase.OnStartEditing()
    GridCellRendererBase.OnEditingComplete()
    GridCellRendererBase.OnValidate()
    GridCellRendererBase.OnValidated()
    GridCellRendererBase.OnActivating(Int32, Int32)
    GridCellRendererBase.OnActivated()
    GridCellRendererBase.ShouldDrawEditing(Int32, Int32)
    GridCellRendererBase.ShouldDrawFocused(Int32, Int32)
    GridCellRendererBase.NotifyCurrentCellChanging()
    GridCellRendererBase.NotifyCurrentCellChanged()
    GridCellRendererBase.NotifyCurrentCellControlDoubleClick(Control)
    GridCellRendererBase.ControlDoubleClick(Object, EventArgs)
    GridCellRendererBase.OnControlDoubleClick(Control)
    GridCellRendererBase.NotifyCurrentCellControlGotFocus(Control)
    GridCellRendererBase.NotifyCurrentCellControlLostFocus(Control)
    GridCellRendererBase.OnShowDropDown()
    GridCellRendererBase.OnCloseDropDown(PopupCloseType)
    GridCellRendererBase.OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs)
    GridCellRendererBase.OnOutlineCurrentCell(Graphics, Rectangle)
    GridCellRendererBase.OnCellLayoutChanged()
    GridCellRendererBase.OnGridGotFocus(EventArgs)
    GridCellRendererBase.ResetCellLayout()
    GridCellRendererBase.GetCellBoundsCore(Int32, Int32)
    GridCellRendererBase.GetCellBoundsCore(Int32, Int32, Boolean)
    GridCellRendererBase.GetCellBoundsCoreInt(Int32, Int32, Boolean)
    GridCellRendererBase.GetCellLayout(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.GetCellClientRectangle(Int32, Int32, GridStyleInfo, Boolean)
    GridCellRendererBase.PerformLayout(Int32, Int32)
    GridCellRendererBase.PerformLayout(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.PerformLayout(Int32, Int32, GridStyleInfo, Rectangle)
    GridCellRendererBase.RemoveMargins(Rectangle, GridStyleInfo)
    GridCellRendererBase.OnLayout(Int32, Int32, GridStyleInfo, Rectangle, Rectangle[])
    GridCellRendererBase.DrawSingleCell(Graphics, Rectangle, Int32, Int32, GridStyleInfo, Boolean)
    GridCellRendererBase.Draw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
    GridCellRendererBase.OnDrawCellButton(GridCellButton, Graphics, Int32, Int32, Boolean, GridStyleInfo)
    GridCellRendererBase.OnDrawCellButtonBackground(GridCellButton, Graphics, Rectangle, ButtonState, GridStyleInfo)
    GridCellRendererBase.OnQueryShowButtons(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.AddButton(GridCellButton)
    GridCellRendererBase.RemoveButton(GridCellButton)
    GridCellRendererBase.GetButton(Int32)
    GridCellRendererBase.DrawBackground(Graphics, Rectangle, GridStyleInfo, Boolean)
    GridCellRendererBase.OnDrawCellBackground(GridDrawCellBackgroundEventArgs)
    GridCellRendererBase.DrawCellAppearance(Graphics, Rectangle, GridStyleInfo)
    GridCellRendererBase.GetMarkHeaderState(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.SetControl(Control)
    GridCellRendererBase.ControlLostFocus(Object, EventArgs)
    GridCellRendererBase.ControlGotFocus(Object, EventArgs)
    GridCellRendererBase.OnSetControlText(String)
    GridCellRendererBase.ResetControlText()
    GridCellRendererBase.UpdateControlValue()
    GridCellRendererBase.SetControlValue(Object, Boolean)
    GridCellRendererBase.InitializeControlText(Object)
    GridCellRendererBase.ResetControlValue()
    GridCellRendererBase.GetDisplayText()
    GridCellRendererBase.GetCellValue()
    GridCellRendererBase.Initialize(Int32, Int32)
    GridCellRendererBase.OnInitialize(Int32, Int32)
    GridCellRendererBase.InitializedAt(Int32, Int32)
    GridCellRendererBase.InitalizedAt(Int32, Int32)
    GridCellRendererBase.Hide()
    GridCellRendererBase.IsControlVisible()
    GridCellRendererBase.RaiseProcessKeyEventArgs(Message)
    GridCellRendererBase.ProcessKeyEventArgs(Message)
    GridCellRendererBase.OnKeyDown(KeyEventArgs)
    GridCellRendererBase.OnKeyUp(KeyEventArgs)
    GridCellRendererBase.Copy()
    GridCellRendererBase.Paste()
    GridCellRendererBase.Cut()
    GridCellRendererBase.CanCopy()
    GridCellRendererBase.CanCut()
    GridCellRendererBase.CanPaste()
    GridCellRendererBase.FindText(String, Int32, Int32, GridFindTextOptions, Boolean)
    GridCellRendererBase.GetCellText(GridStyleInfo, GridFindTextOptions)
    GridCellRendererBase.ReplaceText(String, String, Int32, Int32, GridFindTextOptions, Boolean)
    GridCellRendererBase.ReplaceSel(String)
    GridCellRendererBase.GetSelectedText(String)
    GridCellRendererBase.OnNotifyMsg(Message)
    GridCellRendererBase.IsReadOnly()
    GridCellRendererBase.ValidateString(String)
    GridCellRendererBase.RaiseHitTest(Int32, Int32, MouseEventArgs, IMouseController)
    GridCellRendererBase.RaiseGetCursor(Int32, Int32)
    GridCellRendererBase.OnGetCursor(Int32, Int32)
    GridCellRendererBase.RaiseMouseHoverEnter(Int32, Int32)
    GridCellRendererBase.RaiseMouseHover(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnMouseHover(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.RaiseMouseHoverLeave(Int32, Int32, EventArgs)
    GridCellRendererBase.RaiseMouseDown(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.ControlMouseDown(Object, MouseEventArgs)
    GridCellRendererBase.RaiseMouseMove(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.RaiseMouseUp(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.IsPointOverImage(Int32, Int32, Point)
    GridCellRendererBase.RaiseCancelMode(Int32, Int32)
    GridCellRendererBase.RaiseClick(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnClick(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.RaiseDoubleClick(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnDoubleClick(Int32, Int32, MouseEventArgs)
    GridCellRendererBase.OnButtonClicked(Int32, Int32, Int32)
    GridCellRendererBase.CreateDropDownContainer()
    GridCellRendererBase.EnsureDropDownContainer()
    GridCellRendererBase.InitializeDropDownContainer()
    GridCellRendererBase.ChildClosing(IPopupChild, PopupCloseType)
    GridCellRendererBase.DropDownContainerCloseDropDown(Object, PopupClosedEventArgs)
    GridCellRendererBase.IPopupParent.GetLocationForPopupAlignment(PopupRelativeAlignment, PopupRelativeAlignment)
    GridCellRendererBase.IPopupParent.GetBorderOverlapCue(PopupRelativeAlignment)
    GridCellRendererBase.DropDownContainerShowedDropDown(Object, EventArgs)
    GridCellRendererBase.DropDownContainerShowingDropDown(Object, CancelEventArgs)
    GridCellRendererBase.NotifyShowingDropDown(Size)
    GridCellRendererBase.NotifyShowedDropDown()
    GridCellRendererBase.IPopupItem.GetPopupParentControl()
    GridCellRendererBase.IsRelatedControl(Control, Boolean)
    GridCellRendererBase.OnScrollInView(GridScrollCurrentCellReason)
    GridCellRendererBase.GetNestedCurrentCell()
    GridCellRendererBase.ShouldRefreshCurrentCell()
    GridCellRendererBase.ScaleFactor
    GridCellRendererBase.IsDisposing
    GridCellRendererBase.IsDisposed
    GridCellRendererBase.DropDownImp
    GridCellRendererBase.Model
    GridCellRendererBase.CurrentCell
    GridCellRendererBase.InBeginEdit
    GridCellRendererBase.SupportsFocusControl
    GridCellRendererBase.SupportsEditing
    GridCellRendererBase.HasFocusControl
    GridCellRendererBase.IsEditing
    GridCellRendererBase.IsDroppedDown
    GridCellRendererBase.Control
    GridCellRendererBase.InSetControlText
    GridCellRendererBase.ControlText
    GridCellRendererBase.HasControlText
    GridCellRendererBase.InSetControlValue
    GridCellRendererBase.ControlValue
    GridCellRendererBase.InSetSetControlValue
    GridCellRendererBase.HasControlValue
    GridCellRendererBase.InInitialize
    GridCellRendererBase.CurrentStyle
    GridCellRendererBase.Initalized
    GridCellRendererBase.Grid
    GridCellRendererBase.StyleInfo
    GridCellRendererBase.ForceRefreshOnActivateCell
    GridCellRendererBase.RowIndex
    GridCellRendererBase.ColIndex
    GridCellRendererBase.MouseDownTick
    GridCellRendererBase.MouseDownPoint
    GridCellRendererBase.ClickOverImage
    GridCellRendererBase.AlwaysRaiseCellClick
    GridCellRendererBase.DropDownPart
    GridCellRendererBase.DropDownButton
    GridCellRendererBase.IPopupParent.IsRightToLeft
    GridCellRendererBase.DropDownContainer
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridCheckBoxCellRenderer : GridCellRendererBase, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
    Remarks

    A GridCheckBoxCellRenderer cell's behavior can be customized with the CheckBoxOptions property of a GridStyleInfo instance where you can specify values for Checked, Unchecked, and Indeterminate. The 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 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 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:

    ItemDescription
    CellTypeCheck Box
    RendererGridCheckBoxCellRenderer
    ModelGridCheckBoxCellModel
    XP Themes SupportYes
    InteractiveEdit with Mouse Click or SpaceBar
    Floating SupportFloating
    Base TypeGridCellRendererBase

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

    PropertyNameDescription
    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)
    Borders (GridBordersInfo)Top, left, bottom, and right border settings. (Default: GridBordersInfo.Default)
    CellAppearance (GridCellAppearance)Specifies if cell edges shall be drawn raised, sunken, or flat (default). (Default: GridCellAppearance.Flat)
    CellTipText (System.String)ToolTip text to be displayed when user hovers mouse over cell. (Default: String.Empty)
    CellType (System.String)Check Box (Default: Text Box)
    CellValue (System.Object)The cell value should match one of the values of GridCheckBoxCellInfo. (Default: String.Empty)
    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, Error will contain error information. (Default: NULL)
    CheckBoxOptions (GridCheckBoxCellInfo)Gets / sets flat look and values that represent checked, unchecked, and indeterminate state of the check box. (Default: NULL)
    Description (System.String)Gets / sets the text that is shown in the check box. (Default: String.Empty)
    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)
    Font (GridFontInfo)The font for drawing text. (Default: GridFontInfo.Default)
    HorizontalAlignment (GridHorizontalAlignment)Specifies horizontal alignment of text and the checkbox in the cell. (Default: GridHorizontalAlignment.Left)
    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 Description of a check box can have hotkeys. (Default: HotkeyPrefix.Show)
    Interior (BrushInfo) Lets you specify a solid backColor, gradient, or pattern style with both back and foreColor for a cell's background. (Default: SystemColors.Window)
    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)
    ReadOnly (System.Boolean)Specifies if cell contents can be modified by the user. You can programmatically change Read-only cells by setting DiscardReadOnly to True. (Default: False)
    Text (System.String)Gets / sets the value as a string. If a CellValueType is specified, the text will be parsed and converted to the type specified with CellValueType using any CultureInfo information. The cell value should match one of the values provided by GridCheckBoxCellInfo. (Default: String.Empty)
    TextColor (System.Drawing.Color)Lets you specify the color for drawing the cell text. (Default: SystemColors.WindowText)
    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)
    Themed (System.Boolean)Specifies if cell should be drawn using Windows XP themes when ThemesEnabled has been set. (Default: True)
    TriState (System.Boolean)Specifies if this is a Tristate check box that has an additional indeterminate state. (Default: False)
    Trimming (System.Drawing.StringTrimming)Indicates how text is trimmed when it exceeds the edges of the cell text rectangle. (Default: StringTrimming.Character)
    VerticalAlignment (GridVerticalAlignment)Specifies vertical alignment of text and the check box in the cell. (Default: GridVerticalAlignment.Top)
    WrapText (System.Boolean)Specifies if the Description text should be wrapped when it does not fit into a single line. (Default: True)

    Constructors

    GridCheckBoxCellRenderer(GridControlBase, GridCellModelBase)

    Initializes a new GridCheckBoxCellRenderer object for the given GridControlBase and GridCellModelBase.

    Declaration
    public GridCheckBoxCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
    Parameters
    Type Name Description
    GridControlBase grid

    The GridControlBase that display this cell renderer.

    GridCellModelBase cellModel

    The GridCheckBoxCellModel that holds data for this cell renderer that should be shared among views.

    Remarks

    References to GridControlBase, and GridCellModelBase will be saved.

    Properties

    CheckBoxSize

    Gets or sets CheckBoxSize. For internal use.

    Declaration
    public Size CheckBoxSize { get; set; }
    Property Value
    Type Description
    System.Drawing.Size

    Methods

    DetermineCheckBoxBounds(Graphics, Rectangle, String, Font, ContentAlignment, GridMargins, GridTextAlign)

    Calculates the checker boundaries taking alignment, margins and style information into account.

    Declaration
    protected virtual Rectangle DetermineCheckBoxBounds(Graphics g, Rectangle clientBounds, string text, Font font, ContentAlignment align, GridMargins margins, GridTextAlign textAlign)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Drawing.Rectangle clientBounds

    Specifies the client rectangle. It is the cell rectangle without buttons and borders.

    System.String text

    The text to display in the check box cell.

    System.Drawing.Font font

    The font for drawing text.

    System.Drawing.ContentAlignment align

    The alignment of check box and text inside cell.

    GridMargins margins

    The margins between check box, text, and the cell borders.

    GridTextAlign textAlign

    Specifies if checker should be left or right of text.

    Returns
    Type Description
    System.Drawing.Rectangle

    The rectangle with check box bounds.

    Dispose(Boolean)

    Unwires any events subscribed from GridCheckBoxCellRenderer.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    Overrides
    GridCellRendererBase.Dispose(Boolean)
    Remarks

    See the documentation for the System.ComponentModel.Component class and its Dispose member.

    DrawCheckBox(Graphics, Rectangle, GridStyleInfo, ButtonState, ContentAlignment, String, Font)

    Draws the checker at the given coordinates.

    Declaration
    protected virtual void DrawCheckBox(Graphics g, Rectangle clientBounds, GridStyleInfo style, ButtonState state, ContentAlignment align, string text, Font font)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Drawing.Rectangle clientBounds

    Specifies the client rectangle. It is the cell rectangle without buttons and borders.

    GridStyleInfo style

    A reference to the style object of the cell.

    System.Windows.Forms.ButtonState state

    The current state of the check box to be drawn.

    System.Drawing.ContentAlignment align

    The alignment of check box and text inside cell.

    System.String text

    The text to display in the checkbox cell.

    System.Drawing.Font font

    The font for drawing text.

    DrawCheckBox(Graphics, Rectangle, ButtonState)

    Draws check box at the specified bounds.

    Declaration
    public static void DrawCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state)
    Parameters
    Type Name Description
    System.Drawing.Graphics graphics

    Graphics context.

    System.Drawing.Rectangle rectangle

    The Rectangle Bounds.

    System.Windows.Forms.ButtonState state

    Button state.

    DrawCheckBox(Graphics, Int32, Int32, Int32, Int32, ButtonState)

    Draws checks at the given bounds.

    Declaration
    public static void DrawCheckBox(Graphics graphics, int x, int y, int width, int height, ButtonState state)
    Parameters
    Type Name Description
    System.Drawing.Graphics graphics

    Graphics context.

    System.Int32 x

    X co-ordinate.

    System.Int32 y

    Y co-ordinate.

    System.Int32 width

    Width of the rectangle bounds.

    System.Int32 height

    Height of the rectangle bounds.

    System.Windows.Forms.ButtonState state

    Button state.

    GetCachedCheckerBounds(Int32, Int32)

    Returns the checker bounds for the cell at the specified cell coordinates.

    Declaration
    protected Rectangle GetCachedCheckerBounds(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Specifies the row id.

    System.Int32 colIndex

    Specifies the column id.

    Returns
    Type Description
    System.Drawing.Rectangle

    The System.Drawing.Rectangle with bounds for the checker.

    GetState(Int32, Int32, GridStyleInfo)

    Returns the current System.Windows.Forms.ButtonState for the checker for the specified cell.

    Declaration
    protected ButtonState GetState(int rowIndex, int colIndex, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Specifies the row id.

    System.Int32 colIndex

    Specifies the column id.

    GridStyleInfo style

    A reference to the style object of the cell.

    Returns
    Type Description
    System.Windows.Forms.ButtonState

    The current System.Windows.Forms.ButtonState at the given cell.

    IsCellScope(Int32, Int32)

    Determines if the check box at the specified cell coordinates has scope set.

    Declaration
    public bool IsCellScope(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Specifies the row id.

    System.Int32 colIndex

    Specifies the column id.

    Returns
    Type Description
    System.Boolean

    True if cell has scope; False otherwise.

    OnCancelMode(Int32, Int32)

    This is called from GridClickCellsMouseController or GridSelectCellsMouseController when your cell renderer has indicated in its OnHitTest override that it wants to receive mouse events and the mouse operation is canceled.

    Declaration
    protected override void OnCancelMode(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    Overrides
    GridCellRendererBase.OnCancelMode(Int32, Int32)

    OnClickedCheckBox()

    Called when user clicked check box. Toggles the cell's value and stores it back into the cell.

    Declaration
    protected virtual void OnClickedCheckBox()

    OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)

    This method is called from the cell renderer's draw method to draw the contents of the client bounds for the cell, e.g. the text for a static cell.

    Declaration
    protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Points to the device context.

    System.Drawing.Rectangle clientRectangle

    Specifies the client rectangle. It is the cell rectangle without buttons and borders.

    System.Int32 rowIndex

    Specifies the row id.

    System.Int32 colIndex

    Specifies the column id.

    GridStyleInfo style

    A reference to the style object of the cell.

    Overrides
    GridCellRendererBase.OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
    Remarks

    When drawing cells, it is necessary to determine if the specified cell (with rowIndex and colIndex) is the current cell and if it is active.

    If your control is associated with a control and supports in-place editing and the specified cell is the current cell, you should position the control. Take a look at the GridTextBoxCellRenderer implementation of this method for an example.

    Otherwise, you can simply draw the cell.

    OnHitTest(Int32, Int32, MouseEventArgs, IMouseController)

    Overriden. Checks if mouse is inside the checker.

    Declaration
    protected override int OnHitTest(int rowIndex, int colIndex, MouseEventArgs e, IMouseController controller)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs with data about the mouse event.

    IMouseController controller

    The current controller that requested to handle this mouse event.

    Returns
    Type Description
    System.Int32

    Non-zero if mouse is over the checker; 0 otherwise.

    Overrides
    GridCellRendererBase.OnHitTest(Int32, Int32, MouseEventArgs, IMouseController)

    OnKeyPress(KeyPressEventArgs)

    User pressed key (similar to Control.OnKeyPress).

    Declaration
    protected override void OnKeyPress(KeyPressEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyPressEventArgs e

    A System.Windows.Forms.KeyEventArgs with data of the keyboard event.

    Overrides
    GridCellRendererBase.OnKeyPress(KeyPressEventArgs)

    OnMouseDown(Int32, Int32, MouseEventArgs)

    This is called from GridClickCellsMouseController or GridSelectCellsMouseController when your cell renderer has indicated in its OnHitTest override that it wants to receive mouse events and the user has pressed a mouse button.

    Declaration
    protected override void OnMouseDown(int rowIndex, int colIndex, MouseEventArgs e)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs with event data.

    Overrides
    GridCellRendererBase.OnMouseDown(Int32, Int32, MouseEventArgs)

    OnMouseHoverEnter(Int32, Int32)

    This is called from GridClickCellsMouseController or GridSelectCellsMouseController when your cell renderer has indicated in its OnHitTest override that it wants to receive mouse events and the user has moved the mouse into the cell.

    Declaration
    protected override void OnMouseHoverEnter(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    Overrides
    GridCellRendererBase.OnMouseHoverEnter(Int32, Int32)
    Remarks

    See also OnMouseHoverLeave.

    OnMouseHoverLeave(Int32, Int32, EventArgs)

    This is called from GridClickCellsMouseController or GridSelectCellsMouseController when your cell renderer has indicated in its OnHitTest override that it wants to receive mouse events and the user is moving the mouse out of the cell.

    Declaration
    protected override void OnMouseHoverLeave(int rowIndex, int colIndex, EventArgs e)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.EventArgs e

    An System.EventArgs with event data.

    Overrides
    GridCellRendererBase.OnMouseHoverLeave(Int32, Int32, EventArgs)
    Remarks

    Once OnMouseHoveEnter has been called you are guaranteed to receive a OnMouseHoverLeave call either if the user moves the mouse of the cell boundaries or presses a button or if the mouse operation is canceled.

    OnMouseMove(Int32, Int32, MouseEventArgs)

    This is called from GridClickCellsMouseController or GridSelectCellsMouseController when your cell renderer has indicated in its OnHitTest override that it wants to receive mouse events and the user has pressed a mouse button and is moving the mouse pointer.

    Declaration
    protected override void OnMouseMove(int rowIndex, int colIndex, MouseEventArgs e)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs with event data.

    Overrides
    GridCellRendererBase.OnMouseMove(Int32, Int32, MouseEventArgs)

    OnMouseUp(Int32, Int32, MouseEventArgs)

    This is called from GridClickCellsMouseController or GridSelectCellsMouseController when your cell renderer has indicated in its OnHitTest override that it wants to receive mouse events and the user has pressed a mouse button and is releasing the button.

    Declaration
    protected override void OnMouseUp(int rowIndex, int colIndex, MouseEventArgs e)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs with event data.

    Overrides
    GridCellRendererBase.OnMouseUp(Int32, Int32, MouseEventArgs)

    OnSaveChanges()

    This method is called from GridCurrentCell.ConfirmChanges when the current cell was marked as modified. Any drop-downs have been closed at this time. It saves changes for the current cell.

    Declaration
    protected override bool OnSaveChanges()
    Returns
    Type Description
    System.Boolean

    True if changes were saved successfully; False if no changes were saved.

    Overrides
    GridCellRendererBase.OnSaveChanges()

    SetCellScope(Int32, Int32, Boolean)

    Sets scope for the specified cell.

    Declaration
    public void SetCellScope(int rowIndex, int colIndex, bool value)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Specifies the row id.

    System.Int32 colIndex

    Specifies the column id.

    System.Boolean value

    True if cell has scope; False otherwise.

    Implements

    IQueryFocusInside
    IGridDropDownCell
    IPopupParent
    IPopupItem
    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved