menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridControlBase - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridControlBase

    Implements a grid control that displays a grid model.

    Inheritance
    System.Object
    BaseControl
    ScrollControl
    GridControlBase
    GridControlBaseImp
    GridGroupDropArea
    GridTableControl
    MenuGridControlBase
    Implements
    System.IDisposable
    ICancelModeProvider
    ISplitterPaneSupport
    IScrollBarWrapperContainer
    ISupportUpdating
    ISupportIntelliMouse
    IQueryFocusInside
    INonClientPaintingSupport
    IThemedControl
    ICreateNewWindow
    IGridModelSource
    IGridWindowlessSite
    IGridWindowlessObject
    IFindParentForm
    IThemeProvider
    IVisualStyle
    Inherited Members
    BaseControl.CanApplyTheme
    BaseControl.CanOverrideStyle
    BaseControl.ControlName
    BaseControl.IThemeProvider.BaseThemeName
    BaseControl.RaiseThemeChanged(Object, ThemeChangedEventArgs)
    BaseControl.ThemeNameChanged
    ScrollControl.AccelerateScrolling
    ScrollControl.AccelerateScrollingChanged
    ScrollControl.ActiveController
    ScrollControl.AllowIncreaseSmallChange
    ScrollControl.AllowRaiseMouseMoveInOnDragOver
    ScrollControl.AllowSizeGrip
    ScrollControl.AutoScrollBounds
    ScrollControl.AutoScrolling
    ScrollControl.AutoScrollingChanged
    ScrollControl.AutoScrollTimerEnable
    ScrollControl.BeginUpdate()
    ScrollControl.BorderStyle
    ScrollControl.Bounds
    ScrollControl.CancelMode
    ScrollControl.CancelUpdate()
    ScrollControl.ClientRectangle
    ScrollControl.ClientSize
    ScrollControl.CreateParams
    ScrollControl.Deactivated
    ScrollControl.DisableScrollWindow
    ScrollControl.DiscardPaintMessagesAfterBeginUpdate
    ScrollControl.Dispose()
    ScrollControl.DoubleBufferSurface
    ScrollControl.DpiAware
    ScrollControl.EnableDoubleBufferSurface()
    ScrollControl.EnableIntelliMouse
    ScrollControl.EnableTouchMode
    ScrollControl.EndUpdate()
    ScrollControl.EnsurePaintCodeJitted(Boolean)
    ScrollControl.FillSplitterPane
    ScrollControl.FillSplitterPaneChanged
    ScrollControl.FixRenderOrigin(Graphics)
    ScrollControl.ForceSizeBox
    ScrollControl.GetDynamicSplitterFrameOfComponent(Object)
    ScrollControl.GetScrollBarFrameOfComponent(Object)
    ScrollControl.HasDoubleBufferSurface
    ScrollControl.HitTest(Point)
    ScrollControl.HitTest(Point, MouseButtons)
    ScrollControl.HitTest(Point, MouseButtons, IMouseController)
    ScrollControl.HitTest(Point, MouseButtons, Int32, IMouseController)
    ScrollControl.HorizontalScroll
    ScrollControl.HScrollBar
    ScrollControl.IgnoreSizeGripStyleHideShow
    ScrollControl.IgnoreUICues
    ScrollControl.INonClientPaintingSupport.NonClientPaint(PaintEventArgs, Rectangle, Rectangle)
    ScrollControl.InsideScrollBounds
    ScrollControl.InsideScrollMargins
    ScrollControl.IntelliMouseDragScrolling
    ScrollControl.InvalidateNc()
    ScrollControl.InvalidateNc(Rectangle)
    ScrollControl.IsDisposing
    ScrollControl.ISplitterPaneSupport.FillSplitterPane
    ScrollControl.ISplitterPaneSupport.PaneClosed()
    ScrollControl.ISplitterPaneSupport.PaneClosing()
    ScrollControl.IsSplitterPaneClosed
    ScrollControl.IsSplitterPaneClosing
    ScrollControl.ISupportUpdating.Updating
    ScrollControl.IVisualStyle.VisualTheme
    ScrollControl.LastMousePosition
    ScrollControl.LastMousePositionToClient()
    ScrollControl.MouseControllerDispatcher
    ScrollControl.MouseWheelScrollLines
    ScrollControl.MouseWheelZoom
    ScrollControl.NotifyCancelMode()
    ScrollControl.Office2007ScrollBarsChanged
    ScrollControl.Office2007ScrollBarsColorSchemeChanged
    ScrollControl.Office2010ScrollBarsColorSchemeChanged
    ScrollControl.Office2016BlackColorTable
    ScrollControl.Office2016ColorfulColorTable
    ScrollControl.Office2016DarkGrayColorTable
    ScrollControl.Office2016ScrollBars
    ScrollControl.Office2016ScrollBarsColorSchemeChanged
    ScrollControl.Office2016WhiteColorTable
    ScrollControl.OfficeScrollBarsChanged
    ScrollControl.OnAccelerateScrollingChanged(EventArgs)
    ScrollControl.OnBeginUpdateScrollBars()
    ScrollControl.OnControlRemoved(ControlEventArgs)
    ScrollControl.OnCreateScrollTipWindow()
    ScrollControl.OnEndUpdateScrollBars()
    ScrollControl.OnFillSplitterPaneChanged(EventArgs)
    ScrollControl.OnGotFocus(EventArgs)
    ScrollControl.OnHandleCreated(EventArgs)
    ScrollControl.OnHorizontalScroll(ScrollEventArgs)
    ScrollControl.OnHScrollBarValueChanged(Object, EventArgs)
    ScrollControl.OnIntelliMouseDragScrolling(IntelliMouseDragScrollEventArgs)
    ScrollControl.OnLeave(EventArgs)
    ScrollControl.OnLocationChanged(EventArgs)
    ScrollControl.OnLostFocus(EventArgs)
    ScrollControl.OnMouseHover(EventArgs)
    ScrollControl.OnMouseLeave(EventArgs)
    ScrollControl.OnMouseWheelZoom(MouseWheelZoomEventArgs)
    ScrollControl.OnNcCalcSize(Rectangle)
    ScrollControl.OnNCPaint(NCPaintEventArgs)
    ScrollControl.OnOffice2007ScrollBarsChanged(EventArgs)
    ScrollControl.OnOffice2007ScrollBarsColorSchemeChanged(EventArgs)
    ScrollControl.OnOffice2010ScrollBarsColorSchemeChanged(EventArgs)
    ScrollControl.OnOffice2016ScrollBarsColorSchemeChanged(EventArgs)
    ScrollControl.OnOfficeScrollBarsChanged(ScrollControl.OfficeScrollBarsEventArgs)
    ScrollControl.OnParentChanged(EventArgs)
    ScrollControl.OnRightToLeftChanged(EventArgs)
    ScrollControl.OnScrollbarsVisibleChanged(EventArgs)
    ScrollControl.OnScrollControlHandledMouseDown(MouseEventArgs)
    ScrollControl.OnScrollControlHandledMouseMove(MouseEventArgs)
    ScrollControl.OnScrollControlHandledMouseUp(MouseEventArgs)
    ScrollControl.OnScrollControlMouseMove(CancelMouseEventArgs)
    ScrollControl.OnScrollControlMouseUp(CancelMouseEventArgs)
    ScrollControl.OnSetCursor(Message)
    ScrollControl.OnShowContextMenu(ShowContextMenuEventArgs)
    ScrollControl.OnSplitterPaneClosed(EventArgs)
    ScrollControl.OnStartAutoScrolling(StartAutoScrollingEventArgs)
    ScrollControl.OnUpdatingChanged(EventArgs)
    ScrollControl.OnValidated(EventArgs)
    ScrollControl.OnValidatingLostFocus()
    ScrollControl.OnVerticalScroll(ScrollEventArgs)
    ScrollControl.OnVScroll(Object, ScrollEventArgs)
    ScrollControl.OnVScrollBarValueChanged(Object, EventArgs)
    ScrollControl.OnWindowScrolling(ScrollWindowEventArgs)
    ScrollControl.PaintPending
    ScrollControl.PreJitPaint
    ScrollControl.ProcessMouseWheel(MouseEventArgs)
    ScrollControl.ResetInsideScrollMargins()
    ScrollControl.ResetMouseController()
    ScrollControl.ResetMouseWheelScrollLines()
    ScrollControl.ScrollbarsVisibleChanged
    ScrollControl.ScrollControlHandledMouseDown
    ScrollControl.ScrollControlHandledMouseMove
    ScrollControl.ScrollControlHandledMouseUp
    ScrollControl.ScrollControlMouseDown
    ScrollControl.ScrollControlMouseMove
    ScrollControl.ScrollControlMouseUp
    ScrollControl.ScrollTip
    ScrollControl.ScrollTipFeedback
    ScrollControl.ScrollTipFormat
    ScrollControl.ShouldPrepareUpdate()
    ScrollControl.ShouldPrepareUpdate(Boolean)
    ScrollControl.ShouldSerializeMouseWheelScrollLines()
    ScrollControl.ShowContextMenu
    ScrollControl.Size
    ScrollControl.SizeGripStyle
    ScrollControl.SmartSizeBox
    ScrollControl.SmoothMouseWheelScrolling
    ScrollControl.SplitterPaneClosed
    ScrollControl.SplitterPaneClosing
    ScrollControl.StartAutoScrolling
    ScrollControl.StartAutoScrollTimer(Message)
    ScrollControl.StartAutoScrollTimer(Message, Int32)
    ScrollControl.StartAutoScrollTimer(ScrollBarWrapper, ScrollEventType)
    ScrollControl.SupportsThumbTrack
    ScrollControl.TabIndex
    ScrollControl.UpdateNc()
    ScrollControl.UpdateOptions
    ScrollControl.UpdateStyles()
    ScrollControl.Updating
    ScrollControl.UpdatingChanged
    ScrollControl.UpdatingStyles
    ScrollControl.UseSharedScrollBars
    ScrollControl.VerticalScroll
    ScrollControl.VScrollBar
    ScrollControl.WindowScrolled
    ScrollControl.WindowScrolling
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridControlBase : ScrollControl, IDisposable, ICancelModeProvider, ISplitterPaneSupport, IScrollBarWrapperContainer, ISupportUpdating, ISupportIntelliMouse, IQueryFocusInside, INonClientPaintingSupport, IThemedControl, ICreateNewWindow, IGridModelSource, IGridWindowlessSite, IGridWindowlessObject, IFindParentForm, IThemeProvider, IVisualStyle
    Remarks

    GridControlBase implements a view on a GridModel. Several views can be opened for the same model. Changes in GridModel are reflected immediately among all views.

    The GridModel provides storage for all data and settings associated with the grid. The GridControlBase implements user interaction and display of the data.

    GridControlBase is a user control that is derived from ScrollControl. It lets the user scrolls through grid data with mouse or keyboard. The grid displays a large number of cells where each cell can have its own unique formatting and cell type.

    GridControlBase also offers a wide range of events that let you customize the default behavior of the grid at run-time.

    Constructors

    GridControlBase()

    Initializes a new instance of the GridControlBase class.

    Declaration
    public GridControlBase()

    GridControlBase(GridModel)

    Initializes a new instance of the GridControlBase class and attaches it to an instance of the GridModel class.

    Declaration
    public GridControlBase(GridModel model)
    Parameters
    Type Name Description
    GridModel model

    The GridModel this control is associated with.

    Fields

    firstPaint

    Declaration
    protected bool firstPaint
    Field Value
    Type
    System.Boolean

    m_bInvertRect

    Used internally.

    Declaration
    protected bool m_bInvertRect
    Field Value
    Type
    System.Boolean

    recalcScrollBars

    Declaration
    protected ScrollBars recalcScrollBars
    Field Value
    Type
    System.Windows.Forms.ScrollBars

    SupportsPrepareViewStyleInfo

    By default, the grid will make a copy of any style object before painting and call the PrepareViewStyleInfo event. Changes made to the style object will then be discarded after the painting. Same with DrawCell and other events. Having a copy of the style allows you to change the style object just for drawing purposes. If you do not have any need for this and want to increase scrolling performance of the grid, try setting this property false. But be aware this is only experimental for now ...

    Declaration
    public bool SupportsPrepareViewStyleInfo
    Field Value
    Type
    System.Boolean

    Properties

    AllowColumnResizeUsingCellBoundaries

    Gets or sets a value indicating whether to allow resizing of columns through standard cell boundaries. For GridListControl, it is true by default.

    Declaration
    public virtual bool AllowColumnResizeUsingCellBoundaries { get; set; }
    Property Value
    Type
    System.Boolean

    AllowDrawItemRaiseExceptionCatched

    Gets or sets a value indicating whether to AllowDrawItemRaiseExceptionCatched. Used internally.

    Declaration
    public bool AllowDrawItemRaiseExceptionCatched { get; set; }
    Property Value
    Type
    System.Boolean

    AllowFixFocusWhenCurrentCellIsEditingInMouseUp

    Gets or sets a value indicating whether if you press the mouse button inside the grid and release the mouse the grid checks whether the current cell is in editing mode. If that is the case it will make sure that focus is moved to the current cell control. This ensures the grid will properly return focus to the current cell if a message box is shown and closed in a custom event handler.

    If this behavior causes problems you should set this property false. One known issue we found is when you open another MDI form within a CellDoubleClick event, in which case the focus would be set back to the original form. If you run into such a situation set this property false.

    Declaration
    public bool AllowFixFocusWhenCurrentCellIsEditingInMouseUp { get; set; }
    Property Value
    Type
    System.Boolean

    AllowHScrollOnMouseWheel

    Gets or sets a value indicating whether the horizontal scrolling should be enabled on Mouse wheel.

    Declaration
    public bool AllowHScrollOnMouseWheel { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    When it is set to true, it will perform the horizontal scrolling when mouse wheeling occurs with the System.Windows.Forms.Keys.Shift key is pressed. It also allows to scroll horizontally without using the System.Windows.Forms.Keys.Shift key when the vertical scrollbar is disabled.

    AllowProportionalColumnSizing

    Gets or sets a value to resize the columns proportionally fit its content.

    Declaration
    public bool AllowProportionalColumnSizing { get; set; }
    Property Value
    Type
    System.Boolean

    AllowRowResizeUsingCellBoundaries

    Gets or sets a value indicating whether to allow resizing of rows through standard cell boundaries. No support for GridListControl.

    Declaration
    public virtual bool AllowRowResizeUsingCellBoundaries { get; set; }
    Property Value
    Type
    System.Boolean

    AllowTextBoxAutoSize

    Gets or sets a value indicating whether to force cell renderers to ignore the GridStyleInfo.AutoSize property and do not automatically resize cells while typing.

    Declaration
    public bool AllowTextBoxAutoSize { get; set; }
    Property Value
    Type
    System.Boolean

    AllowViewStyleCacheBaseStyleValues

    Gets or sets a value indicating whether the grid can enable caching style property values of GetViewStyleInfo styles when accessed the first time. This will make accessing the same property repeatedly faster (e.g. style.CellValue or style.ReadOnly might be accessed multiple times from different routines for the same style object).

    Declaration
    public static bool AllowViewStyleCacheBaseStyleValues { get; set; }
    Property Value
    Type
    System.Boolean

    BackColor

    Specifies the background color for the grid.

    Declaration
    public override Color BackColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    BackgroundImageID

    Gets or sets the Namespace ID that contains the grids's background image information id.

    Declaration
    public string BackgroundImageID { get; set; }
    Property Value
    Type
    System.String
    Remarks

    The default value for the BackgroundImageID property is "".

    Capture

    Gets or sets a value indicating whether System.Windows.Forms.Control.Capture of the parent control with window handle (see GetWindow()).

    Declaration
    public bool Capture { get; set; }
    Property Value
    Type
    System.Boolean

    CellRenderers

    Gets the collection of GridCellRendererBase objects for the current grid view method.

    Declaration
    public GridCellRendererCollection CellRenderers { get; }
    Property Value
    Type
    GridCellRendererCollection
    Remarks

    Cell renderers will be created on demand by calling the CreateRenderer(GridControlBase). Each renderer is associated with a GridCellModelBase object that holds its data and has knowledge how to instantiate a renderer and associates it with a grid view.

    A renderer is created for each grid view but renderers (of the same cell type) share the same GridCellModelBase instance even though they belong to different grid views.

    Examples

    The following examples show how to get a reference to the renderer for a specific cell.

                GridStyleInfo style = Model[rowIndex, colIndex];
                GridCellRendererBase renderer = CellRenderers[style.CellType];

    CurrentCell

    Gets GridCurrentCell object that provides storage for current cell information and manages all current cell operation such as activating, deactivating, saving, editing, and moving the current cell.

    Declaration
    public virtual GridCurrentCell CurrentCell { get; }
    Property Value
    Type
    GridCurrentCell
    Remarks

    CurrentCell gives you a one stop interface for all current cell related operations. This is useful for an Intellisense-based programming environment since you do not have to dig through many unrelated functions.

    Events for the current cell will be raised by the GridControlBase itself. The grid offers many events for the current cell that let you customize the current cell's behavior at any stage of operation.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase. The HasCurrentCell property tells you if the grid has an active current cell. The HasCurrentCellAt(Int32) method lets you find out if the current cell is at a specific row and column index.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    Examples

    The following example shows how you can customize the behavior of the current cell and highlight the whole row of the current cell instead of just the current cell itself.

            /// Current cell will be moving from one position to another.
            protected override void OnCurrentCellMoving(GridCurrentCellMovingEventArgs e)
            {
                e.Options |= GridSetCurrentCellOptions.BeginEndUpdate;
                // Instead of GridSetCurrentCellOptions.BeginEndUpdate we could also
                // sandwich the call in a Begin/EndUpdate pair ourselves ...
                //BeginUpdate(BeginUpdateOptions.InvalidateAndScroll);
            }
            /// Completes a current cell's MoveTo operation indicating success.
            protected override void OnCurrentCellMoved(GridCurrentCellMovedEventArgs e)
            {
                base.OnCurrentCellMoved(e);
                //EndUpdate();
            }
            /// Completes a current cell's MoveTo operation indicating failure.
            protected override void OnCurrentCellMoveFailed(GridCurrentCellMoveFailedEventArgs e)
            {
                base.OnCurrentCellMoveFailed(e);
                //EndUpdate();
            }
            /// Highlight the current row.
            protected override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
            {
                if (e.RowIndex > this.Model.Rows.HeaderCount && e.ColIndex > this.Model.Cols.HeaderCount
                    && CurrentCell.HasCurrentCellAt(e.RowIndex))
                {
                    e.Style.Interior = new BrushInfo(SystemColors.Highlight);
                    e.Style.TextColor = SystemColors.HighlightText;
                    e.Style.Font.Bold = true;
                }
                base.OnPrepareViewStyleInfo(e);
            }
            /// Refresh the whole row for the old position of the current cell when it is moved to
            /// a new row or when current cell is deactivated stand-alone.
            protected override void OnCurrentCellDeactivated(GridCurrentCellDeactivatedEventArgs e)
            {
                // Check if Deactivate is called stand-alone or called from MoveTo and row is moving.
                if (!CurrentCell.IsInMoveTo || CurrentCell.MoveToRowIndex != CurrentCell.MoveFromRowIndex)
                {
                    RefreshRange(GridRangeInfo.Row(e.RowIndex), GridRangeOptions.MergeAllSpannedCells);
                }
                base.OnCurrentCellDeactivated(e);
            }
            /// Refresh the whole row for the new current cell position when the current cell is moved
            /// to a new row or when current cell is activated stand-alone (and there was no activated current cell).
            protected override void OnCurrentCellActivated(EventArgs e)
            {
                // Check if Activate is called stand-alone or called from MoveTo and row is moving
                base.OnCurrentCellActivated(e);
                if (!CurrentCell.IsInMoveTo || CurrentCell.MoveToRowIndex != CurrentCell.MoveFromRowIndex
                    || !CurrentCell.MoveFromActiveState)
                {
                    RefreshRange(GridRangeInfo.Row(CurrentCell.RowIndex), GridRangeOptions.MergeAllSpannedCells);
                }
            }

    Cursor

    Gets or sets the cursor to be displayed when the mouse pointer is over the control.

    Declaration
    public override Cursor Cursor { get; set; }
    Property Value
    Type
    System.Windows.Forms.Cursor
    Overrides
    ScrollControl.Cursor

    DefaultColWidth

    Gets or sets DefaultSize for the Cols object in the GridModel.

    Declaration
    public int DefaultColWidth { get; set; }
    Property Value
    Type
    System.Int32

    DefaultRowHeight

    Gets or sets DefaultSize for the Rows object in the GridModel.

    Declaration
    public int DefaultRowHeight { get; set; }
    Property Value
    Type
    System.Int32

    DefaultSize

    Gets the default size of the control.

    Declaration
    protected override Size DefaultSize { get; }
    Property Value
    Type
    System.Drawing.Size

    DisableFormattedTextInEditMode

    Gets or sets a value indicating whether the formatting of the cell text can be disabled in edit mode.

    Declaration
    public bool DisableFormattedTextInEditMode { get; set; }
    Property Value
    Type
    System.Boolean

    DropDownContainerParent

    Gets or sets to allow you to specify a GridDropDownContainer as parent of the grid when used inside a drop-down. This is necessary if nested popups are needed.

    Declaration
    public IGridDropDownContainer DropDownContainerParent { get; set; }
    Property Value
    Type
    IGridDropDownContainer

    EnableRTLMark

    Gets or sets a value to include Unicode character in text.

    Declaration
    public bool EnableRTLMark { get; set; }
    Property Value
    Type
    System.Boolean

    ExcelLikeAlignment

    Gets or sets a value that to get the alignment in Grid as in Excel.

    Declaration
    public bool ExcelLikeAlignment { get; set; }
    Property Value
    Type
    System.Boolean

    ExcelLikeFrameSelections

    Gets or sets ExcelLikeFrameSelections. Used internally.

    Declaration
    public IGridDrawSelectionFrame ExcelLikeFrameSelections { get; set; }
    Property Value
    Type
    IGridDrawSelectionFrame

    ExternalMove

    Gets or sets the ExternalMove. Used by GridSelectCellsMouseController.

    Declaration
    public GridCurrentCellMoveDelegateHandler ExternalMove { get; set; }
    Property Value
    Type
    GridCurrentCellMoveDelegateHandler

    Focused

    Gets a value indicating whether the control has input focus.

    Declaration
    public bool Focused { get; }
    Property Value
    Type
    System.Boolean

    FocusOnMouseDown

    Gets or sets a value indicating whether if set to False if you want to suppress setting focus during a MouseDown event. This is useful if you have a MouseController that does not need focus.

    Declaration
    public bool FocusOnMouseDown { get; set; }
    Property Value
    Type
    System.Boolean

    ForceCurrentCellMoveTo

    Gets or sets a value indicating whether False, any calls to MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) will be deferred until the grid sets the active control inside a parent container and its System.Windows.Forms.Control.OnEnter(System.EventArgs) method is called.

    Declaration
    public bool ForceCurrentCellMoveTo { get; set; }
    Property Value
    Type
    System.Boolean

    GridBounds

    Gets or sets the bounds of the grid. This is normally the System.Windows.Forms.Control.ClientRectangle of a control but you change GridBounds and by doing this instruct the grid that only parts of the current should be used to display the grid.

    Declaration
    public Rectangle GridBounds { get; set; }
    Property Value
    Type
    System.Drawing.Rectangle
    Remarks

    While in printing mode, GridBounds will return printer dimensions.

    GridCapture

    Gets or sets a value indicating whether System.Windows.Forms.Control.Capture of the parent control with window handle (see GetWindow()).

    Declaration
    public bool GridCapture { get; set; }
    Property Value
    Type
    System.Boolean

    GridCellsRange

    Gets the current range of the grid excluding header rows and columns.

    Declaration
    public GridRangeInfo GridCellsRange { get; }
    Property Value
    Type
    GridRangeInfo

    GridControlBaseEventsTarget

    Gets or sets the GridControlBaseEventsTarget. Redirects events defined in IGridControlBaseEventsTarget to the specified object. Each event will first be called on GridControlBaseEventsTarget before the actual event handler in this control is called.

    Declaration
    public IGridControlBaseEventsTarget GridControlBaseEventsTarget { get; set; }
    Property Value
    Type
    IGridControlBaseEventsTarget

    GridOfficeScrollBars

    Gets or sets MS Office-like scrollbars.

    Declaration
    public override OfficeScrollBars GridOfficeScrollBars { get; set; }
    Property Value
    Type
    OfficeScrollBars
    Overrides
    ScrollControl.GridOfficeScrollBars

    HandleWMSYSCHAR

    Gets or sets a value indicating whether WM_SYSCHAR need to be handled in TextBox and OriginalTextBox Cell types to handle universal Keyboard Mappings.

    Declaration
    public bool HandleWMSYSCHAR { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    This property is mainly added to handle the scenario where Input characters from a universal keyBoard Mapping will be WM_SYSCHAR (0x104), instead of WM_CHAR (0x102), which needs the TextBox and OriginalTextBox CellTypes to be forced to read the Key Messages.

    HasBackgroundImageID

    Gets a value indicating whether BackgroundImage state has been initialized for the current object.

    Declaration
    public bool HasBackgroundImageID { get; }
    Property Value
    Type
    System.Boolean

    HasControlFocus

    Gets a value indicating whether OnControlGotFocus() has been called. OnControlLostFocus() resets this flag.

    Declaration
    public bool HasControlFocus { get; }
    Property Value
    Type
    System.Boolean

    HasGridBounds

    Gets a value indicating whether GridBounds was initialized. If not, GridBounds returns the same value as System.Windows.Forms.Control.ClientRectangle.

    Declaration
    public bool HasGridBounds { get; }
    Property Value
    Type
    System.Boolean

    HitTestSelectionEdge

    Gets or sets a value indicating whether HitTestSelectionEdge. Used internally.

    Declaration
    public bool HitTestSelectionEdge { get; set; }
    Property Value
    Type
    System.Boolean

    HorizontalScrollTips

    Gets or sets a value indicating whether if the control should show Scroll Tips while the user is dragging a horizontal scrollbar thumb.

    Declaration
    public override bool HorizontalScrollTips { get; set; }
    Property Value
    Type
    System.Boolean
    Overrides
    ScrollControl.HorizontalScrollTips

    HorizontalThumbTrack

    Gets or sets a value indicating whether if the control should scroll while the user is dragging a horizontal scrollbars thumb.

    Declaration
    public override bool HorizontalThumbTrack { get; set; }
    Property Value
    Type
    System.Boolean
    Overrides
    ScrollControl.HorizontalThumbTrack

    HScroll

    Gets or sets a value indicating whether it enables or disables horizontal scrollbar. Overridden with GridControlBase, use HScrollBehavior instead.

    Declaration
    public bool HScroll { get; set; }
    Property Value
    Type
    System.Boolean

    HScrollBehavior

    Gets or sets the behavior of the horizontal scrollbar.

    Declaration
    public GridScrollbarMode HScrollBehavior { get; set; }
    Property Value
    Type Description
    GridScrollbarMode

    A GridScrollbarMode enumeration that offers various options for the scrollbar behavior.

    HScrollIncrement

    Gets or sets the multiplier for the mouse wheel scrolling.

    Declaration
    public override int HScrollIncrement { get; set; }
    Property Value
    Type
    System.Int32
    Overrides
    ScrollControl.HScrollIncrement

    HScrollPixel

    Gets or sets a value indicating whether it enables horizontal pixel scrolling for the grid.

    Declaration
    public bool HScrollPixel { get; set; }
    Property Value
    Type
    System.Boolean

    IgnoreCurrentCellInvalidate

    Gets or sets a value indicating whether it prevents any calls to Invalidate() to have any effect when current cell is being moved or current cell is activated or deactivated.

    Declaration
    public bool IgnoreCurrentCellInvalidate { get; set; }
    Property Value
    Type
    System.Boolean

    InImeComposition

    Gets a value indicating whether true after WM_IME_STARTCOMPOSITION is sent and False once WM_IME_ENDCOMPOSITION is handled.

    Declaration
    public bool InImeComposition { get; }
    Property Value
    Type
    System.Boolean

    InUpdateWithCustomPaint

    Gets a value indicating whether true when UpdateWithCustomPaint was called.

    Declaration
    public bool InUpdateWithCustomPaint { get; }
    Property Value
    Type
    System.Boolean

    InvalidBounds

    Gets or sets the outer rectangle after a batch of Invalid calls after a BeginUpdate call. This is for internal use only.

    Declaration
    public Rectangle InvalidBounds { get; set; }
    Property Value
    Type
    System.Drawing.Rectangle

    IsActiveControl

    Gets a value indicating whether the System.Windows.Forms.Control.OnEnter has been called. System.Windows.Forms.Control.OnLeave resets this flag.

    Declaration
    public bool IsActiveControl { get; }
    Property Value
    Type
    System.Boolean

    IsDeactivated

    Gets a value indicating whether System.Windows.Forms.OnDeactivated has been called. System.Windows.Forms.Control.OnEnter resets this flag.

    Declaration
    public bool IsDeactivated { get; }
    Property Value
    Type
    System.Boolean

    IsDrawing

    Gets a value indicating whether the grid is inside a System.Windows.Forms.Control.OnPaint(System.Windows.Forms.PaintEventArgs) method call.

    Declaration
    public bool IsDrawing { get; }
    Property Value
    Type
    System.Boolean

    IsInLeaveOrValidate

    Gets a value indicating whether the grid is currently handling a System.Windows.Forms.Control.Validating event.

    Declaration
    public bool IsInLeaveOrValidate { get; }
    Property Value
    Type
    System.Boolean

    IsMousePressed

    Gets or sets a value indicating whether the the control is handling a System.Windows.Forms.Control.MouseDown event.

    Declaration
    public bool IsMousePressed { get; set; }
    Property Value
    Type
    System.Boolean

    IsValidated

    Gets a value indicating whether the System.Windows.Forms.Control.OnValidated method has been called. System.Windows.Forms.Control.OnLeave and System.Windows.Forms.Control.OnEnter reset this flag.

    Declaration
    public bool IsValidated { get; }
    Property Value
    Type
    System.Boolean

    IsValidating

    Gets a value indicating whether the System.Windows.Forms.Control.OnValidating method has been called. System.Windows.Forms.Control.OnLeave and System.Windows.Forms.Control.OnEnter reset this flag.

    Declaration
    public bool IsValidating { get; }
    Property Value
    Type
    System.Boolean

    IsVisualStyleEnabled

    Gets a value indicating whether the visual style based theme is applied to the control and also indicates whether the theme files are referred from external assemblies or not.

    Declaration
    public bool IsVisualStyleEnabled { get; }
    Property Value
    Type Description
    System.Boolean

    Return true, if the visual style based theme is applied to the control. Otherwise returns false.

    IsWindowless

    Gets or sets a value indicating whether the control is used in windowless mode.

    Declaration
    public bool IsWindowless { get; set; }
    Property Value
    Type
    System.Boolean

    LeftColIndex

    Gets or sets the column index of the left column. Scrolls the grid when changed.

    Declaration
    public int LeftColIndex { get; set; }
    Property Value
    Type
    System.Int32

    MarkColHeader

    Gets or sets a value indicating whether the column header for the current cell should be highlighted.

    Declaration
    public bool MarkColHeader { get; set; }
    Property Value
    Type
    System.Boolean

    MarkRowHeader

    Gets or sets a value indicating whether the row header for the current cell should be highlighted.

    Declaration
    public bool MarkRowHeader { get; set; }
    Property Value
    Type
    System.Boolean

    MetroColorTable

    Gets the ScrollControl's MetroColorTable

    Declaration
    public override MetroColorTable MetroColorTable { get; set; }
    Property Value
    Type
    MetroColorTable
    Overrides
    ScrollControl.MetroColorTable

    MetroScrollBars

    Gets the ScrollControl's MetroScrollBars

    Declaration
    public override bool MetroScrollBars { get; set; }
    Property Value
    Type
    System.Boolean
    Overrides
    ScrollControl.MetroScrollBars

    Model

    Gets or sets the GridModel that manages data to be displayed in the grid.

    Declaration
    public GridModel Model { get; set; }
    Property Value
    Type
    GridModel
    Remarks

    You can replace the GridModel at run-time. The GridControlBase will release and establish links to the previous model and establish new relationship with the new model, then redraw itself.

    Office2007ScrollBars

    Gets or sets a value indicating whether Office2007 scroll bars should be enabled or not.

    Declaration
    public override bool Office2007ScrollBars { get; set; }
    Property Value
    Type
    System.Boolean
    Overrides
    ScrollControl.Office2007ScrollBars

    Office2007ScrollBarsColorScheme

    Gets or sets the style of Office2007 scroll bars

    Declaration
    public override Office2007ColorScheme Office2007ScrollBarsColorScheme { get; set; }
    Property Value
    Type
    Office2007ColorScheme
    Overrides
    ScrollControl.Office2007ScrollBarsColorScheme
    Examples

    This example show how to set the color for Office2007ScrollBars.

    //Enable the Office2007ScrollBars.
    this.gridControl1.Office2007ScrollBars = true;
    //Set the color for office2007ScrollBars.
    this.gridControl1.Office2007ScrollBarsColorScheme = Office2007ColorScheme.Black;
    'Enable the Office2007ScrollBars.
    Me.gridControl1.Office2007ScrollBars = True
    'Set the color for office2007ScrollBars.
    Me.gridControl1.Office2007ScrollBarsColorScheme = Office2007ColorScheme.Black

    Office2010ScrollBarsColorScheme

    Gets or sets the style of Office2010 scroll bars

    Declaration
    public override Office2010ColorScheme Office2010ScrollBarsColorScheme { get; set; }
    Property Value
    Type
    Office2010ColorScheme
    Overrides
    ScrollControl.Office2010ScrollBarsColorScheme

    Office2016ScrollBarsColorScheme

    Gets or sets the style of Office2016 scroll bars

    Declaration
    public override ScrollBarOffice2016ColorScheme Office2016ScrollBarsColorScheme { get; set; }
    Property Value
    Type
    ScrollBarOffice2016ColorScheme
    Overrides
    ScrollControl.Office2016ScrollBarsColorScheme

    OleDragDropEventsTarget

    Gets or sets the OleDragDropEventsTarget. Redirects events defined in IGridOleDragDropEventsTarget to the specified object. Each event will first be called on IGridOleDragDropEventsTarget before the actual event handler in this control is called.

    Declaration
    public IGridOleDragDropEventsTarget OleDragDropEventsTarget { get; set; }
    Property Value
    Type
    IGridOleDragDropEventsTarget

    OptimizeDrawBackground

    Gets or sets a value indicating whether the grid's painting routines have a built-in optimization where it combines cells that have the same background to be drawn with one paint operation instead of drawing the background for each cell individually.

    Declaration
    public bool OptimizeDrawBackground { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    The property is true by default. The optimization causes the DrawCellBackground event to be hit for every cell and also change the background color of a style object within a OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo) operation to be ignored.

    You should set it False if this is an issue for you. Or you could also try setting Interior be set to BrushInfo.Empty to force DrawCellBackground be called for cells.

    OptimizeInsertRemoveCells

    Gets or sets a value indicating whether inserting and removing cells should be optimized by scrolling window contents and only invalidating new cells. Otherwise the whole area is repainted (this is the default).

    Declaration
    public virtual bool OptimizeInsertRemoveCells { get; set; }
    Property Value
    Type
    System.Boolean

    PaintSelectCells

    Gets PaintSelectCells. Used internally.

    Declaration
    public virtual IGridPaintSelectCells PaintSelectCells { get; }
    Property Value
    Type
    IGridPaintSelectCells

    PaneDesc

    Gets the pane information.

    Declaration
    public override string PaneDesc { get; }
    Property Value
    Type
    System.String
    Overrides
    ScrollControl.PaneDesc

    ParentSite

    Gets or sets the parent control that implements IGridWindowlessSite.

    Declaration
    public IGridWindowlessSite ParentSite { get; set; }
    Property Value
    Type
    IGridWindowlessSite

    PdfExport

    Gets or sets a value to enable when exporting Grid to PDF

    Declaration
    public bool PdfExport { get; set; }
    Property Value
    Type Description
    System.Boolean

    The Default value is False.

    PersistAppearanceSettings

    Gets or sets if the metro theme settings for grid should differ from other themes for look and feel.

    Declaration
    public bool PersistAppearanceSettings { get; set; }
    Property Value
    Type
    System.Boolean

    PrintBounds

    Gets or sets the grid bounds while the grid is in printing mode.

    Declaration
    public Rectangle PrintBounds { get; set; }
    Property Value
    Type
    System.Drawing.Rectangle

    PrintInfo

    Gets temporary information related to printing. This class will change in future versions.

    Declaration
    public GridPrintInfo PrintInfo { get; }
    Property Value
    Type
    GridPrintInfo

    PrintingMode

    Gets or sets a value indicating whether it toggles printing mode for the grid. While in printing mode GridBounds will return the print rectangle of the page being printed and not the client rectangle of the control on the screen.

    Declaration
    public bool PrintingMode { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    When printing the grid, the GridPrintDocument class will toggle the printing mode for the grid. At that time, all drawing related code will use the printing page as canvas and GridBounds.

    Also, TopRowIndex and LeftColIndex will return values with top row and left column for the page that is currently being printed.

    ScrollableGridRangeInfo

    Gets the current range of cells that are scrollable (all rows and columns excluding frozen rows and columns).

    Declaration
    public GridRangeInfo ScrollableGridRangeInfo { get; }
    Property Value
    Type
    GridRangeInfo

    Selections

    Gets selected ranges in the grid. Allows you to add and remove selections, determines selection state of a specific cell and more.

    Declaration
    public GridModelSelections Selections { get; }
    Property Value
    Type
    GridModelSelections

    ShowDisabledGridAsGray

    Gets or sets whether the grid is shown as gray if it is disabled. The default value is false.

    Declaration
    public bool ShowDisabledGridAsGray { get; set; }
    Property Value
    Type
    System.Boolean

    ShowMessageBoxOnDrop

    Gets or sets a value indicating whether to display message box before dropping cell contents from source to the destination.

    Declaration
    public bool ShowMessageBoxOnDrop { get; set; }
    Property Value
    Type
    System.Boolean

    ShowRowHeaderErroricon

    Gets or sets a value indicating if the error icon should be displayed in the header cell if the validation is failed.

    Declaration
    public bool ShowRowHeaderErroricon { get; set; }
    Property Value
    Type
    System.Boolean

    ShowTouchIndicator

    Gets or sets a value indicating whether control shows the touch indicator on touch mode.

    Declaration
    public bool ShowTouchIndicator { get; set; }
    Property Value
    Type Description
    System.Boolean

    True or False.

    Remarks

    This settings effects if Excel-like selection have been enabled with ExcelLikeSelectionFrame and SelectionFrameOption.Excel2016 have been enabled with SelectionFrameOption.

    SortIconPlacement

    Gets or sets a value to assign the placement of the SortIcon

    Declaration
    public SortIconPlacement SortIconPlacement { get; set; }
    Property Value
    Type
    SortIconPlacement

    SplitCol

    Gets the column in the splitter where this control is displayed, if the grid is used inside a dynamic splitter control.

    Declaration
    public int SplitCol { get; }
    Property Value
    Type
    System.Int32

    SplitRow

    Gets the row in the splitter where this control is displayed, if the grid is used inside a dynamic splitter control.

    Declaration
    public int SplitRow { get; }
    Property Value
    Type
    System.Int32

    SupportsTransparentBackColor

    Gets or sets a value indicating whether it toggles support for Windows 2000 and Windows XP transparency. Set this true if you want the grid to draw transparent over a background bitmap.

    Declaration
    public bool SupportsTransparentBackColor { get; set; }
    Property Value
    Type
    System.Boolean

    ThemeName

    Gets or sets the theme name of the control.

    Declaration
    public string ThemeName { get; set; }
    Property Value
    Type Description
    System.String

    The default value is null.

    Remarks

    This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.

    ThemesEnabled

    Gets or sets a value indicating whether XP Themes (visual styles) should be used for this control when available.

    Declaration
    public bool ThemesEnabled { get; set; }
    Property Value
    Type
    System.Boolean

    ThemeStyle

    Gets or sets the GridControlVisualStyle value used to customize the appearance of the GridControl.

    Declaration
    public GridControlVisualStyle ThemeStyle { get; set; }
    Property Value
    Type
    GridControlVisualStyle
    Remarks

    This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.

    TopRowIndex

    Gets or sets the column index of the left column. Scrolls the grid when changed.

    Declaration
    public int TopRowIndex { get; set; }
    Property Value
    Type
    System.Int32

    UnHideColsOnDblClick

    Gets or sets a value indicating whether to allow resizing of hidden columns when double click. Default value is true.

    Declaration
    public bool UnHideColsOnDblClick { get; set; }
    Property Value
    Type
    System.Boolean

    UpdateSelectRange_OldRange

    Gets or sets UpdateSelectRange_OldRange. Used internally.

    Declaration
    public GridRangeInfoList UpdateSelectRange_OldRange { get; set; }
    Property Value
    Type
    GridRangeInfoList

    UpdateSelectRange_Range

    Gets or sets UpdateSelectRange_Range. Used internally.

    Declaration
    public GridRangeInfo UpdateSelectRange_Range { get; set; }
    Property Value
    Type
    GridRangeInfo

    UseGdiPlusRightAlignedTextWorkaround

    Gets or sets a value indicating whether UseGdiPlusRightAlignedTextWorkaround implements a work-around for a GDI+ known issue with right-aligned text and DrawString.

    Declaration
    public static bool UseGdiPlusRightAlignedTextWorkaround { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    When you have cells with right-aligned text some words are not aligned at the right border as you would expect. This is because of GDI+ designed behavior, and the degree of the problem varies from font to font. You can see this behavior for example with regular System.Windows.Forms.Label controls. Since Essential Grid relies on GDI+, it exhibits the same behavior. Besides using a Mono spaced Font, some include using either anti aliased string drawing or explicitly measuring the string width and not relying on DrawString to draw the text right-aligned.

    When you enable UseGdiPlusRightAlignedTextWorkaround then the static cell renderer will use the measure string width workaround. However, this will slow down drawing of right-aligned text.

    UseImageListDrawing

    Gets or sets a value indicating whether Grid uses ImageList_DrawEx to draw cell images. Lets you switch to default ImageList_Draw instead. Added for PrintColumnsToFit helper class which uses Metafile drawings internally

    Declaration
    public static bool UseImageListDrawing { get; set; }
    Property Value
    Type
    System.Boolean

    UseOldHiddenScrollLogic

    Gets or sets a value indicating whether to switch back to old logic used for hiding rows or columns in case of any compatibility problems (logic was changed after 4.2)

    Declaration
    public static bool UseOldHiddenScrollLogic { get; set; }
    Property Value
    Type
    System.Boolean

    VerticalScrollTips

    Gets or sets a value indicating whether if the control should show Scroll Tips while the user is dragging a vertical scrollbar thumb.

    Declaration
    public override bool VerticalScrollTips { get; set; }
    Property Value
    Type
    System.Boolean
    Overrides
    ScrollControl.VerticalScrollTips

    VerticalThumbTrack

    Gets or sets a value indicating whether if the control should scroll while the user is dragging a vertical scrollbar thumb.

    Declaration
    public override bool VerticalThumbTrack { get; set; }
    Property Value
    Type
    System.Boolean
    Overrides
    ScrollControl.VerticalThumbTrack

    ViewLayout

    Gets layout information about the grid such as cell positions, number of visible rows, and more. Provides functions that let you find a cell under a given point.

    Declaration
    public GridViewLayout ViewLayout { get; }
    Property Value
    Type
    GridViewLayout

    VScroll

    Gets or sets a value indicating whether it enables or disables vertical scrollbar. Overridden with GridControlBase, use VScrollBehavior instead.

    Declaration
    public bool VScroll { get; set; }
    Property Value
    Type
    System.Boolean

    VScrollBehavior

    Gets or sets the behavior of the vertical scrollbar.

    Declaration
    public GridScrollbarMode VScrollBehavior { get; set; }
    Property Value
    Type Description
    GridScrollbarMode

    A GridScrollbarMode enumeration that offers various options for the scrollbar behavior.

    VScrollIncrement

    Gets or sets the multiplier for mouse wheel scrolling.

    Declaration
    public override int VScrollIncrement { get; set; }
    Property Value
    Type
    System.Int32
    Overrides
    ScrollControl.VScrollIncrement

    VScrollPixel

    Gets or sets a value indicating whether it enables vertical pixel scrolling for the grid.

    Declaration
    public bool VScrollPixel { get; set; }
    Property Value
    Type
    System.Boolean

    WantEnterKey

    Gets or sets a value indicating whether the grid control should handle Enter key to move between cells. Set this to False if Enter should be ignored instead.

    Declaration
    public bool WantEnterKey { get; set; }
    Property Value
    Type
    System.Boolean

    WantEscapeKey

    Gets or sets a value indicating whether the grid control should handle Escape to reset cell contents or reset cell selections. Set this to False if the Escape key should be ignored instead.

    Declaration
    public bool WantEscapeKey { get; set; }
    Property Value
    Type
    System.Boolean

    WantKeys

    Gets or sets a value indicating whether if false if you want to suppress key events for the grid. This is useful if you want to implement your own keyboard handling and not have any default key handlers in the grid.

    Declaration
    public bool WantKeys { get; set; }
    Property Value
    Type
    System.Boolean

    WantTabKey

    Gets or sets a value indicating whether the grid control should handle tab keys to move between cells. Set this to False if focus should move to the next control in the form instead.

    Declaration
    public virtual bool WantTabKey { get; set; }
    Property Value
    Type
    System.Boolean

    WantTabKeyInPreProcessMessage

    Gets or sets a value indicating whether the grid control should handle tab keys to move between cells right away in the PreProcessMessage method to make sure no other control on a form can override the tab key behavior of this control. This is useful when the grid is hosted in an ActiveX host and the ActiveX container does not honor the grids ProcessDialogKey override. The default value for this property is false.

    Declaration
    public bool WantTabKeyInPreProcessMessage { get; set; }
    Property Value
    Type
    System.Boolean

    Methods

    BeginUpdate(BeginUpdateOptions)

    Suspends the painting of the control until the EndUpdate() method is called.

    Declaration
    public override sealed void BeginUpdate(BeginUpdateOptions options)
    Parameters
    Type Name Description
    BeginUpdateOptions options

    Specifies the painting support during the BeginUpdate, EndUpdate batch.

    Overrides
    ScrollControl.BeginUpdate(BeginUpdateOptions)
    Remarks

    When many paint are made to the appearance of a control, you should invoke the BeginUpdate method to temporarily freeze the drawing of the control. This results in less distraction to the user, and a performance gain. After all updates have been made, invoke the EndUpdate method to resume drawing of the control.

    Pass BeginUpdateOptions if you do not want to do a complete Refresh of the control and instead want to have certain regions of your control be invalidated or scroll the contents of control.

    If you call BeginUpdate() and then later EndUpdate(), the control will know if a paint is pending and only refresh the control if a paint is pending. Either call to ShouldPrepareUpdate, Invalidate or a WM_PAINT message during the BeginUpdate EndUpdate block will signal the control that a paint is pending.
    See Also
    ShouldPrepareUpdate()
    EndUpdate()

    BeginUpdateModel(BeginUpdateOptions, Boolean)

    Suspends the painting of the control until the EndUpdate(Boolean) method is called.

    Declaration
    public virtual void BeginUpdateModel(BeginUpdateOptions options, bool fromModel)
    Parameters
    Type Name Description
    BeginUpdateOptions options

    Specifies the painting support during the BeginUpdate, EndUpdate batch.

    System.Boolean fromModel

    Specifies if this BeginUpdate call was triggered by a call to the BeginUpdate() of the GridModel.

    ColIndexToHScrollPixelPos(Int32)

    Declaration
    public virtual int ColIndexToHScrollPixelPos(int colIndex)
    Parameters
    Type Name Description
    System.Int32 colIndex
    Returns
    Type
    System.Int32

    CreateGridGraphics()

    Creates a System.Drawing.Graphics object for this control and raises a PrepareGraphics event. The graphics object must be disposed after usage.

    Declaration
    public virtual Graphics CreateGridGraphics()
    Returns
    Type Description
    System.Drawing.Graphics

    A System.Drawing.Graphics object.

    Remarks

    Raises a PrepareGraphics event.

    Examples

    This example shows how to create the graphics object for the grid control.

    //Creates the Graphics for the control.
    Graphics graphics = this.gridControl1.CreateGridGraphics();
    'Creates the Graphics for the control.
    Dim graphics As Graphics = Me.gridControl1.CreateGridGraphics()

    CreateNewControl(Control, Int32, Int32)

    Creates a new GridControlBase and attaches it to the same GridModel.

    Declaration
    public virtual Control CreateNewControl(Control parent, int row, int column)
    Parameters
    Type Name Description
    System.Windows.Forms.Control parent

    A parent control. Can be a SplitterControl.

    System.Int32 row

    The row in a SplitterControl.

    System.Int32 column

    The column in a SplitterControl.

    Returns
    Type Description
    System.Windows.Forms.Control

    A new instance of GridControlBase.

    Dispose(Boolean)

    Disposes the unmanaged resources.

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

    DrawClippedGrid(Graphics, Rectangle)

    Draws the portion of the grid within the clipBounds to the specified System.Drawing.Graphics canvas. Clipping will automatically occur when the grid was horizontally scrolled and the first column is only partially or when the grid was vertically scrolled and the first row is only partially visible.

    Declaration
    public void DrawClippedGrid(Graphics g, Rectangle clipBounds)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Drawing.Rectangle clipBounds

    The target area the grid should be drawn to.

    Remarks

    Use this method if you want to increase performance when you have frequent Invalidate(Rectangle) and Update() calls.

    Examples

    This sample below lets you draw changes cells directly to graphics context instead of using the conventional Invalidate / Update approach.

    bool drawDirectToDC = true;
    Graphics g = null;
    if (drawDirectToDC)
        g = m_syncGrid.CreateGridGraphics();
    // Clear our volatile cache
    m_syncGrid.ResetVolatileData();
    // Handle case when values is change for current cell.
    if (g1 == m_syncGrid.CurrentCell.RangeInfo)
    {
        m_syncGrid.CurrentCell.Model.ResetActiveText(row, col);
        continue;
    }
    // Draw direct to dc
    if (drawDirectToDC)
    {
        Rectangle bounds = m_syncGrid.RangeInfoToRectangle(g1);
        if (!bounds.IsEmpty)
        {
        // Instead of
        if (false)
        {
                // Draw each cell individually to graphics context
            GridStyleInfo style = this.m_syncGrid.Model[row, col];
            GridCellRendererBase renderer = this.m_syncGrid.CellRenderers[style.CellType];
            // Get client rectangle
            bounds = style.CellModel.SubtractBorders(bounds, style, this.m_syncGrid.IsRightToLeft());
            // Draw cell Background
            Syncfusion.Drawing.BrushPaint.FillRectangle(g, bounds, style.Interior);
            // Draw cell text
            renderer.Draw(g, bounds, row, col, style);
        }
        else
        {
            // DrawClippedGrid method lets you simply draw the cells at the specified bounds directly to the graphics context.
            // less code than drawing each cell individually ....
            m_syncGrid.DrawClippedGrid(g, bounds);
        }
    }
    else
    {
        // Use more conventional Invalidate / Update mechanism.
            m_syncGrid.RefreshRange(GridRangeInfo.Cell(row, col);
    }
    if (g != null)
        g.Dispose();

    DrawClippedGrid(Graphics, Rectangle, Boolean)

    Draws the portion of the grid within the clipBounds to the specified System.Drawing.Graphics canvas.

    Declaration
    public void DrawClippedGrid(Graphics g, Rectangle clipBounds, bool shouldClip)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Drawing.Rectangle clipBounds

    The target area the grid should be drawn to.

    System.Boolean shouldClip

    Whether or not the clipBounds is taken into account.

    DrawErrorIcon(GridDrawCellEventArgs, GridIconPaint)

    Draws the error icon in the current cell if the current cell has an error.

    Declaration
    protected virtual void DrawErrorIcon(GridDrawCellEventArgs e, GridIconPaint iconPainter)
    Parameters
    Type Name Description
    GridDrawCellEventArgs e

    A GridDrawCellEventArgs that contains the event data.

    GridIconPaint iconPainter

    The icon painter to draw the error icon.

    DrawGrid(Graphics)

    Draws the grid to the specified System.Drawing.Graphics canvas and using the grid boundaries specified with GridBounds.

    Declaration
    public void DrawGrid(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    DrawGrid(Graphics, Boolean)

    Draws the grid to the specified System.Drawing.Graphics canvas and using the grid boundaries specified with GridBounds.

    Declaration
    public virtual void DrawGrid(Graphics g, bool shouldClip)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Boolean shouldClip

    Specifies if clipping region should be saved and restored after the grid is drawn.

    DrawGrid(Graphics, Rectangle, Boolean)

    Draws the grid to the specified System.Drawing.Graphics canvas and using the grid boundaries specified with GridBounds.

    Declaration
    public void DrawGrid(Graphics g, Rectangle bounds, bool drawCurrentCell)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Drawing.Rectangle bounds

    The target bounds (client coordinates of the control) where the grid should be drawn.

    System.Boolean drawCurrentCell

    Specifies whether the current cell should be drawn and outlined; if False current cell is drawn just like any other regular cell.

    DrawGrid(Graphics, Rectangle, Boolean, Boolean)

    Draws the grid to the specified System.Drawing.Graphics canvas and specified boundaries.

    Declaration
    public void DrawGrid(Graphics g, Rectangle bounds, bool drawCurrentCell, bool shouldClip)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Drawing.Rectangle bounds

    The target area the grid should be drawn to.

    System.Boolean drawCurrentCell

    Indicates if current cell shoud be outlined.

    System.Boolean shouldClip

    Specifies if clipping region should be saved and restored after the grid was drawn.

    DrawInvertCell(Graphics, Int32, Int32, Rectangle, Boolean)

    Occurs when the grid drawing engine wants to invert a cell when it belongs to a selected range.

    Declaration
    protected virtual void DrawInvertCell(Graphics g, int rowIndex, int colIndex, Rectangle rectItem, bool inPaint)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Drawing.Rectangle rectItem

    Specifies the cell rectangle. Please note that rectItem only is the visible bounds of cell.

    System.Boolean inPaint

    True if method was called from within System.Widows.Forms.Control.OnPaint for this control.

    DrawSingleCell(Graphics, Int32, Int32, Rectangle, GridStyleInfo, Boolean, Boolean)

    Call this method to draw a single cell to a graphics object at the specified rectangle. The method does not clip the output.

    Be aware that if pixel scrolling is enabled the caller needs to use clipping if this cell is at the top row or left column and only partially visible.

    Declaration
    public virtual void DrawSingleCell(Graphics g, int rowIndex, int colIndex, Rectangle cellRectangle, GridStyleInfo style, bool forceDrawBackground, bool drawBorders)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Drawing.Rectangle cellRectangle

    Specifies the cell rectangle. Please note that rectItem only is the visible bounds of cell.

    GridStyleInfo style

    The GridStyleInfo object that holds cell information.

    System.Boolean forceDrawBackground

    Forces the background should be drawn.

    System.Boolean drawBorders

    Specifies whether the borders should also be drawn or excluded.

    EndUpdate(Boolean)

    Resumes the painting of the control suspended by calling the BeginUpdate method.

    Declaration
    public override sealed void EndUpdate(bool update)
    Parameters
    Type Name Description
    System.Boolean update

    True if pending paint operations should be executed immediately; False if they should be discarded.

    Overrides
    ScrollControl.EndUpdate(Boolean)
    Remarks

    When many paint are made to the appearance of a control, you should invoke the BeginUpdate method to temporarily freeze the drawing of the control. This results in less distraction to the user, and a performance gain. After all updates have been made, invoke the EndUpdate method to resume drawing of the control.

    See Also
    BeginUpdate()

    EndUpdateModel(Boolean, Boolean)

    Resumes the painting of the control suspended by calling the BeginUpdate method.

    Declaration
    public virtual void EndUpdateModel(bool update, bool fromModel)
    Parameters
    Type Name Description
    System.Boolean update

    True if pending paint operations should be executed immediately; False if they should be discarded.

    System.Boolean fromModel

    Specified if this EndUpdate call was triggered by a call to the EndUpdate() of the GridModel

    FillRect(Graphics, Rectangle)

    Used to fill the rectangle

    Declaration
    public void FillRect(Graphics g, Rectangle r)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Represents the GDI+ surfaces

    System.Drawing.Rectangle r

    Used to represent the location and size of the rectangle

    FindParentForm()

    Retrieves the form that the control is on. Works also with windowless mode.

    Declaration
    public Form FindParentForm()
    Returns
    Type Description
    System.Windows.Forms.Form

    The form that the control is on

    FixCurrentCellGotFocus()

    Used internally.

    Declaration
    public void FixCurrentCellGotFocus()

    FixCurrentCellGotFocus(Boolean)

    Used internally.

    Declaration
    public void FixCurrentCellGotFocus(bool noScroll)
    Parameters
    Type Name Description
    System.Boolean noScroll

    FixCurrentCellLostFocus()

    Used internally.

    Declaration
    public void FixCurrentCellLostFocus()

    Focus()

    Sets input focus to the control.

    Declaration
    public virtual bool Focus()
    Returns
    Type Description
    System.Boolean

    True if the control is focused.

    GetActiveThemeName()

    Gets the active theme name of the control.

    Declaration
    public override string GetActiveThemeName()
    Returns
    Type Description
    System.String

    Returns the active theme name.

    Overrides
    BaseControl.GetActiveThemeName()

    GetBackColor(Color)

    Gets a back color, replaces SystemColors.Window with the System.Windows.Forms.Control.BackColor of this control.

    Declaration
    public virtual Color GetBackColor(Color c)
    Parameters
    Type Name Description
    System.Drawing.Color c

    The original color.

    Returns
    Type Description
    System.Drawing.Color

    The resulting color.

    GetBackgroundColor()

    Returns the Background color to be drawn after the last cell (default is Model.Properties.BackgroundColor)

    Declaration
    public virtual Color GetBackgroundColor()
    Returns
    Type Description
    System.Drawing.Color

    A Background Color

    GetCachedGraphics()

    Returns a System.Drawing.Graphics object that is instantiated on demand and cached. When the grid size, grid location or scroll position changes the graphics object will be recreated. Use GetCachedGraphics when you want to optimize drawing speed of the grid and call DrawClippedGrid(Graphics, Rectangle) to draw cells directly with this graphics object as shown in the TraderGridTest example.

    Declaration
    public virtual Graphics GetCachedGraphics()
    Returns
    Type Description
    System.Drawing.Graphics

    A Graphics object.

    GetCellRenderer(Int32, Int32)

    Declaration
    public GridCellRendererBase GetCellRenderer(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex
    System.Int32 colIndex
    Returns
    Type
    GridCellRendererBase

    GetClientCol(Int32)

    Returns the client column index for an absolute column index.

    Declaration
    public int GetClientCol(int colIndex)
    Parameters
    Type Name Description
    System.Int32 colIndex

    The absolute column index.

    Returns
    Type Description
    System.Int32

    The client column index relative to the top column index.

    Remarks

    Client column indexes indicate the visible client columns in the current view.

    Client column indexes are numbered from 0 to the number of visible columns.

    Absolute column indexes are independent of the scroll position.

    If you have a client column index, you should first convert the client column index to an absolute column index before querying information about the column, such as column height or cell contents.

    GetClientRow(Int32)

    Returns the client row index for an absolute row index.

    Declaration
    public int GetClientRow(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The absolute row index.

    Returns
    Type Description
    System.Int32

    The client row index relative to the top row index.

    Remarks

    Client row indexes indicate the visible client rows in the current view.

    Client row indexes are numbered from 0 to the number of visible rows.

    Absolute row indexes are independent of the scroll position.

    If you have a client row index you should first convert the client row index to an absolute row index before querying information about the row, such as row height or cell contents.

    GetCol(Int32)

    Returns the absolute column index for a client column index.

    Declaration
    public int GetCol(int nClientCol)
    Parameters
    Type Name Description
    System.Int32 nClientCol

    The client column index.

    Returns
    Type Description
    System.Int32

    The absolute column index calculated based on the given client column index and the left column index.

    GetColHidden(Int32)

    Determines if a specified column is hidden in the current grid view.

    Declaration
    public bool GetColHidden(int colIndex)
    Parameters
    Type Name Description
    System.Int32 colIndex

    The column index.

    Returns
    Type Description
    System.Boolean

    True if column should be hidden; False otherwise.

    Remarks

    You can programmatically hide columns with the Item[Int32] of a HideCols object in the GridModel.

    Other criteria that will make a column be hidden in the current view are if this is the right pane in a splitter view or if queried row is a row header column and the RowHeaders of GridProperties object is true.

    GetColWidth(Int32)

    Returns the column widths at the Item[Int32] of a ColWidths object in the GridModel or 0 if column is hidden.

    Declaration
    public virtual int GetColWidth(int colIndex)
    Parameters
    Type Name Description
    System.Int32 colIndex

    Column index.

    Returns
    Type Description
    System.Int32

    Column width.

    See Also
    GetColHidden(Int32)

    GetControlName(String)

    Helps to override the ThemeName property settings

    Declaration
    public override string GetControlName(string controlName)
    Parameters
    Type Name Description
    System.String controlName

    ThemeName

    Returns
    Type
    System.String
    Overrides
    BaseControl.GetControlName(String)

    GetCurrentCell()

    Returns the GridCurrentCell object.

    Declaration
    protected virtual GridCurrentCell GetCurrentCell()
    Returns
    Type Description
    GridCurrentCell

    The CurrentCell.

    GetCurrentHScrollPixelDelta()

    The current difference between the left column's pixel offset and the current scroll position.

    Declaration
    public int GetCurrentHScrollPixelDelta()
    Returns
    Type Description
    System.Int32

    Difference between left column's pixel offset and current scroll position.

    GetCurrentHScrollPixelPos()

    Declaration
    public int GetCurrentHScrollPixelPos()
    Returns
    Type
    System.Int32

    GetCurrentVScrollPixelDelta()

    Gets the current offset in pixel for the top most row.

    Declaration
    public int GetCurrentVScrollPixelDelta()
    Returns
    Type Description
    System.Int32

    The number of pixels the top most row is above the view area.

    GetCurrentVScrollPixelPos()

    Declaration
    public int GetCurrentVScrollPixelPos()
    Returns
    Type
    System.Int32

    GetDefaultMaxStandardValuesSize()

    Returns the default maximum size for the drop-down part of a StandardValuesCell.

    Declaration
    protected virtual Size GetDefaultMaxStandardValuesSize()
    Returns
    Type Description
    System.Drawing.Size

    returns the size

    GetFirstScrollableCol()

    Returns the first column that is visible after the frozen columns.

    Declaration
    public int GetFirstScrollableCol()
    Returns
    Type Description
    System.Int32

    First scrollable column index.

    GetFirstScrollableRow()

    Returns the first row that is visible after the frozen rows.

    Declaration
    public int GetFirstScrollableRow()
    Returns
    Type Description
    System.Int32

    First scrollable row index.

    GetForeColor(Color)

    Gets a fore color, replaces SystemColors.WindowText with the System.Windows.Forms.Control.ForeColor of this control.

    Declaration
    public virtual Color GetForeColor(Color c)
    Parameters
    Type Name Description
    System.Drawing.Color c

    The original color.

    Returns
    Type Description
    System.Drawing.Color

    The resulting color.

    GetGridVisualStyles()

    Returns the VisualStyles (Model.Options.GridVisualStyles)

    Declaration
    public virtual GridVisualStyles GetGridVisualStyles()
    Returns
    Type Description
    GridVisualStyles

    Returns GridVisualStyles

    GetGridVisualStylesDrawing()

    Returns the IVisualStyleDrawing (Model.Options.GridVisualStylesDrawing)

    Declaration
    public virtual IVisualStylesDrawing GetGridVisualStylesDrawing()
    Returns
    Type Description
    IVisualStylesDrawing

    IVisualStyleDrawing object.

    GetGridWindow()

    Returns the parent control with window handle and casts it to GridControlBase.

    Declaration
    public GridControlBase GetGridWindow()
    Returns
    Type Description
    GridControlBase

    The GridControlBase with a valid window handle.

    Remarks

    When the IsWindowless property is True, it will return the parent control; otherwise a reference to this object itself is returned.

    GetHScrollPixelMinimum()

    The left most scroll position for pixel scrolling.

    Declaration
    public int GetHScrollPixelMinimum()
    Returns
    Type Description
    System.Int32

    Left most scroll position.

    GetHScrollPixelWidth()

    Gets the total width of the grid for pixel scrolling.

    Declaration
    public virtual int GetHScrollPixelWidth()
    Returns
    Type Description
    System.Int32

    Total grid width.

    GetInterior(BrushInfo)

    Gets a BrushInfo, replaces SystemColors.Window with the System.Windows.Forms.Control.BackColor of this control.

    Declaration
    public virtual BrushInfo GetInterior(BrushInfo br)
    Parameters
    Type Name Description
    BrushInfo br

    The original BrushInfo.

    Returns
    Type Description
    BrushInfo

    The resulting BrushInfo.

    GetMaximumLeftColIndex()

    Returns the maximum value for LeftColIndex.

    Declaration
    public int GetMaximumLeftColIndex()
    Returns
    Type Description
    System.Int32

    Maximum value

    Examples

    The following example lets you scroll through all columns in a grid

    GridControlBase grid;
    int min = grid.GetMinimumLeftColIndex();
    int max = grid.GetMaximumLeftColIndex();
    for (int v = min; v <= max; v++)
    {
        grid.LeftColIndex = v;
    }
    Dim grid As GridControlBase
    int min = grid.GetMinimumLeftColIndex();
    int max = grid.GetMaximumLeftColIndex();
    for (int v = min; v <= max; v++)
    {
        grid.LeftColIndex = v;
    }

    GetMaximumPossibleLeftCol(out Rectangle)

    Returns the smallest value to be used as LeftColIndex for which the last column of the grid is visible.

    Declaration
    public virtual int GetMaximumPossibleLeftCol(out Rectangle rectMove)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rectMove

    Returns the rectangle with scroll bounds for the grid.

    Returns
    Type Description
    System.Int32

    The calculated column index.

    GetMaximumPossibleTopRow(out Rectangle)

    Returns the smallest value to be used as TopRowIndex for which the last row of the grid is visible.

    Declaration
    public virtual int GetMaximumPossibleTopRow(out Rectangle rectMove)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rectMove

    Returns the rectangle with scroll bounds for the grid.

    Returns
    Type Description
    System.Int32

    The calculated row index.

    GetMaximumTopRowIndex()

    Returns the maximum value for TopRowIndex.

    Declaration
    public int GetMaximumTopRowIndex()
    Returns
    Type Description
    System.Int32

    Maximum value

    Examples

    The following example lets you scroll through all rows in a grid

    GridControlBase grid;
    int min = grid.GetMinimumTopRowIndex();
    int max = grid.GetMaximumTopRowIndex();
    for (int v = min; v <= max; v++)
    {
        grid.TopRowIndex = v;
    }
    Dim grid As GridControlBase
    int min = grid.GetMinimumTopRowIndex();
    int max = grid.GetMaximumTopRowIndex();
    for (int v = min; v <= max; v++)
    {
        grid.TopRowIndex = v;
    }

    GetMinimumLeftColIndex()

    Returns the minimum value for LeftColIndex.

    Declaration
    public int GetMinimumLeftColIndex()
    Returns
    Type Description
    System.Int32

    Minimum value

    Examples

    The following example lets you scroll through all columns in a grid

    GridControlBase grid;
    int min = grid.GetMinimumLeftColIndex();
    int max = grid.GetMaximumLeftColIndex();
    for (int v = min; v <= max; v++)
    {
        grid.LeftColIndex = v;
    }
    Dim grid As GridControlBase
    int min = grid.GetMinimumLeftColIndex();
    int max = grid.GetMaximumLeftColIndex();
    for (int v = min; v <= max; v++)
    {
        grid.LeftColIndex = v;
    }

    GetMinimumTopRowIndex()

    Returns the minimum value for TopRowIndex.

    Declaration
    public int GetMinimumTopRowIndex()
    Returns
    Type Description
    System.Int32

    Minimum value

    Examples

    The following example lets you scroll through all rows in a grid

    GridControlBase grid;
    int min = grid.GetMinimumTopRowIndex();
    int max = grid.GetMaximumTopRowIndex();
    for (int v = min; v <= max; v++)
    {
        grid.TopRowIndex = v;
    }
    Dim grid As GridControlBase
    int min = grid.GetMinimumTopRowIndex();
    int max = grid.GetMaximumTopRowIndex();
    for (int v = min; v <= max; v++)
    {
        grid.TopRowIndex = v;
    }

    GetNextCurrentCellPosition(GridDirectionType, ref Int32, ref Int32)

    Determines the next position for the current cell for a given direction. Normally, cells that are not marked as enabled with Enabled will be skipped but you can hook into this mechanism by implementing an event handler for QueryNextCurrentCellPosition.

    Declaration
    public bool GetNextCurrentCellPosition(GridDirectionType direction, ref int rowIndex, ref int colIndex)
    Parameters
    Type Name Description
    GridDirectionType direction

    The GridDirectionType that specifies the direction of the current cell movement.

    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    Returns
    Type Description
    System.Boolean

    True if an enabled cell was found; False otherwise.

    Remarks

    This method will raise the QueryNextCurrentCellPosition event. In your event handler, you can call QueryNextEnabledCell(GridDirectionType, ref Int32, ref Int32) from your QueryNextMoveCell event handler to find out about the next enabled cell and then decide on further criteria if the suggested cell is good.

    See the SampleGrid class in the grid pad sample for an example.

    GetOtherSplitColumnChildPane(Int32, Int32)

    If the grid is used inside a dynamic splitter control, this method gives you access to the sibling grid control in another pane of the same splitter control.

    Declaration
    public GridControlBase GetOtherSplitColumnChildPane(int nSplitRow, int nSplitCol)
    Parameters
    Type Name Description
    System.Int32 nSplitRow

    The row of the current control in the splitter control.

    System.Int32 nSplitCol

    The column of the current control in the splitter control.

    Returns
    Type Description
    GridControlBase

    A reference to the GridControlBase in the sibling pane.

    GetOtherSplitRowChildPane(Int32, Int32)

    If the grid is used inside a dynamic splitter control, this method gives you access to the sibling grid control in another pane of the same splitter control.

    Declaration
    public GridControlBase GetOtherSplitRowChildPane(int nSplitRow, int nSplitCol)
    Parameters
    Type Name Description
    System.Int32 nSplitRow

    The row of the current control in the splitter control.

    System.Int32 nSplitCol

    The column of the current control in the splitter control.

    Returns
    Type Description
    GridControlBase

    A reference to the GridControlBase in the sibling pane.

    GetRow(Int32)

    Returns the absolute row index for a client row index.

    Declaration
    public int GetRow(int nClientRow)
    Parameters
    Type Name Description
    System.Int32 nClientRow

    The client row index.

    Returns
    Type Description
    System.Int32

    The absolute row index calculated based on the given client row index and the top row index.

    GetRowHeight(Int32)

    Returns the row height at the Item[Int32] of a RowHeights object in the GridModel or 0 if row is hidden.

    Declaration
    public virtual int GetRowHeight(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Row index.

    Returns
    Type Description
    System.Int32

    Row height.

    See Also
    GetRowHidden(Int32)

    GetRowHidden(Int32)

    Determines if a specified row is hidden in the current grid view.

    Declaration
    public virtual bool GetRowHidden(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    Returns
    Type Description
    System.Boolean

    True if row should be hidden; False otherwise.

    Remarks

    You can programmatically hide rows with the Item[Int32] of a HideRows object in the GridModel.

    Other criteria that will make a row be hidden in the current view are if this is the lower pane in a splitter view or if queried row is a column header row and the ColHeaders of GridProperties object is true.

    GetRowRangeHeight(Int32, Int32)

    Returns the total row height for a range of rows.

    Declaration
    public int GetRowRangeHeight(int rowIndex1, int rowIndex2)
    Parameters
    Type Name Description
    System.Int32 rowIndex1

    The first row.

    System.Int32 rowIndex2

    The last row.

    Returns
    Type Description
    System.Int32

    The total row height in pixel.

    GetRowRangeHeight(Int32, Int32, Int32)

    Declaration
    public virtual int GetRowRangeHeight(int fromRowIndex, int toRowIndex, int maxSize)
    Parameters
    Type Name Description
    System.Int32 fromRowIndex
    System.Int32 toRowIndex
    System.Int32 maxSize
    Returns
    Type
    System.Int32

    GetScrollOutOfViewCurrentCellState(out GridCellRendererBase, out Control, out Rectangle, out Int32, out Int32, GridDirectionType)

    Gets the current cell state which is in scroll_outof_view.

    Declaration
    protected virtual void GetScrollOutOfViewCurrentCellState(out GridCellRendererBase cellRenderer, out Control cellControl, out Rectangle currentCellBounds, out int currentCellRowIndex, out int currentCellColIndex, GridDirectionType direction)
    Parameters
    Type Name Description
    GridCellRendererBase cellRenderer
    System.Windows.Forms.Control cellControl
    System.Drawing.Rectangle currentCellBounds
    System.Int32 currentCellRowIndex
    System.Int32 currentCellColIndex
    GridDirectionType direction

    GetViewStyleInfo(Int32, Int32)

    Queries cell information that includes custom formatting based on the current view state. The custom formatting is determined by raising the PrepareViewStyleInfo event.

    Declaration
    public GridStyleInfo GetViewStyleInfo(int rowIndex, int colIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    Returns
    Type Description
    GridStyleInfo

    The GridStyleInfo object that holds cell information.

    Examples

    This example shows how to get the view style of a cell.

    void gridControl1_CellClick(object sender, GridCellClickEventArgs e)
    {
        GridStyleInfo style;
        style = this.gridControl1.GetViewStyleInfo(e.RowIndex,e.ColIndex);
    }
    Private Sub gridControl1_CellClick(ByVal sender As Object, ByVal e As GridCellClickEventArgs)
        Dim style As GridStyleInfo
        style = Me.gridControl1.GetViewStyleInfo(e.RowIndex,e.ColIndex)
    End Sub

    GetViewStyleInfo(Int32, Int32, Boolean)

    Queries cell information that includes custom formatting based on the current view state. The custom formatting is determined by raising PrepareViewStyleInfo event.

    Declaration
    public virtual GridStyleInfo GetViewStyleInfo(int rowIndex, int colIndex, bool forceQueryCellInfo)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Boolean forceQueryCellInfo

    For the QueryCellInfo to be called and not cache style objects.

    Returns
    Type Description
    GridStyleInfo

    The GridStyleInfo object that holds cell information.

    GetVisibleBounds()

    Returns the intersection between this control's bounds and the bounds of a parent control with window handle.

    Declaration
    public Rectangle GetVisibleBounds()
    Returns
    Type Description
    System.Drawing.Rectangle

    The rectangle for the visible area of this control.

    Remarks

    When the IsWindowless property is True, it will intersect the GridBounds with the parent control's GetVisibleBounds(); otherwise simply the GridBounds are returned.

    GetVisibleFrozenCols()

    Returns the actual number of visible frozen columns including the row header if visible. So, in case all columns are visible the value returned by this method will be Cols.FrozenCount + 1.

    Declaration
    public int GetVisibleFrozenCols()
    Returns
    Type Description
    System.Int32

    Number of visible frozen columns.

    GetVisibleFrozenRows()

    Returns the actual number of visible frozen rows including the column header if visible. So, in case all rows are visible the value returned by this method will be Rows.FrozenCount + 1.

    Declaration
    public int GetVisibleFrozenRows()
    Returns
    Type Description
    System.Int32

    Number of visible frozen rows.

    GetVScrollPixelHeight()

    Gets the total height of all rows in the grid.

    Declaration
    public virtual int GetVScrollPixelHeight()
    Returns
    Type Description
    System.Int32

    The total height of all rows in the grid.

    GetVScrollPixelMinimum()

    Gets the smallest value possible for vertical pixel scroll position (will be assigned to VScrollBar.Minimum).

    Declaration
    public int GetVScrollPixelMinimum()
    Returns
    Type Description
    System.Int32

    The smallest value possible for vertical pixel scroll position.

    GetWindow()

    Returns the parent control with window handle.

    Declaration
    public Control GetWindow()
    Returns
    Type Description
    System.Windows.Forms.Control

    The control with a valid window handle.

    Remarks

    When the IsWindowless property is True, it will return the parent control; otherwise a reference to this object itself is returned.

    GridPointToClient(Point)

    Converts a point to client coordinates.

    Declaration
    public Point GridPointToClient(Point p)
    Parameters
    Type Name Description
    System.Drawing.Point p

    The original point in screen coordinates.

    Returns
    Type Description
    System.Drawing.Point

    The resulting point in client coordinates.

    Remarks

    This method also supports SetWindowlessBounds(Control, Rectangle, Boolean) mode.

    GridPointToScreen(Point)

    Converts a point to screen coordinates.

    Declaration
    public Point GridPointToScreen(Point p)
    Parameters
    Type Name Description
    System.Drawing.Point p

    The original point in client coordinates.

    Returns
    Type Description
    System.Drawing.Point

    The resulting point in screen coordinates.

    Remarks

    This method also supports SetWindowlessBounds(Control, Rectangle, Boolean) mode.

    GridRectangleToClient(Rectangle)

    Converts a rectangle to client coordinates.

    Declaration
    public Rectangle GridRectangleToClient(Rectangle rect)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rect

    The original rectangle in screen coordinates.

    Returns
    Type Description
    System.Drawing.Rectangle

    The resulting rectangle in client coordinates.

    Remarks

    This method also supports SetWindowlessBounds(Control, Rectangle, Boolean) mode.

    GridRectangleToScreen(Rectangle)

    Converts a rectangle to screen coordinates.

    Declaration
    public Rectangle GridRectangleToScreen(Rectangle rect)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rect

    The original rectangle in client coordinates.

    Returns
    Type Description
    System.Drawing.Rectangle

    The resulting rectangle in screen coordinates.

    Remarks

    This method also supports SetWindowlessBounds(Control, Rectangle, Boolean) mode.

    HScrollPixelPosToColIndex(Int32, out Int32, out Int32)

    Declaration
    public virtual void HScrollPixelPosToColIndex(int pixelPos, out int colIndex, out int pixelDelta)
    Parameters
    Type Name Description
    System.Int32 pixelPos
    System.Int32 colIndex
    System.Int32 pixelDelta

    HScrollPixelScrollInView(Rectangle)

    Scrolls the left and / or right bounds of the rectangle into view.

    Declaration
    public virtual bool HScrollPixelScrollInView(Rectangle r)
    Parameters
    Type Name Description
    System.Drawing.Rectangle r

    Bounded rectangle.

    Returns
    Type Description
    System.Boolean

    True if scrolling is successful; False otherwise.

    Initialize()

    Initializes the control after it has been added to the parent's System.Windows.Forms.Control.Controls collection.

    Declaration
    public virtual void Initialize()

    InitializeDataObjectConsumerOptions()

    Initializes all data object consumers for this grid. See GridDataObjectConsumerOptions for default consumers that you can enable and disable through the DataObjectConsumerOptions property of the Options property.

    Declaration
    protected virtual void InitializeDataObjectConsumerOptions()
    Remarks

    Controllers will be registered with by RegisterDataObjectConsumer(IGridDataObjectConsumer).

    InitializeMouseControllers()

    Initializes all mouse controllers for this grid. See GridControllerOptions for default mouse controllers that you can enable and disable through the ControllerOptions of the Options property.

    Declaration
    protected virtual void InitializeMouseControllers()
    Remarks

    Controllers will be added and removed from MouseControllerDispatcher.

    InitLayout()

    Overridden and calls Initialize() when the control is added to the parent forms System.Windows.Forms.Control.Controls collection.

    Declaration
    protected override void InitLayout()

    InitPrintInfo()

    Method used internally by nested table control to copy LeftColIndex, TopRowIndex and Bounds to PrintInfo.

    Declaration
    public void InitPrintInfo()

    InitSplitterControl()

    Used internally.

    Declaration
    public void InitSplitterControl()

    IntDrawInvertCell(Graphics, Int32, Int32, Rectangle, Boolean)

    Used internally.

    Declaration
    public void IntDrawInvertCell(Graphics g, int rowIndex, int colIndex, Rectangle rectItem, bool inPaint)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Int32 rowIndex
    System.Int32 colIndex
    System.Drawing.Rectangle rectItem
    System.Boolean inPaint

    IntUpdateSelectRange()

    Declaration
    protected virtual void IntUpdateSelectRange()

    Invalidate()

    Call System.Windows.Form.Control.Invalidate() of the parent control with window handle (see GetWindow()).

    Declaration
    public virtual void Invalidate()

    Invalidate(Rectangle)

    Call System.Windows.Form.Control.Invalidate() of the parent control with window handle (see GetWindow()).

    Declaration
    public virtual void Invalidate(Rectangle rc)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rc

    The area to invalidate.

    Invalidate(Rectangle, Boolean)

    Call System.Windows.Form.Control.Invalidate() of the parent control with window handle (see GetWindow()).

    Declaration
    public virtual void Invalidate(Rectangle rc, bool invalidateChildren)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rc

    The area to invalidate.

    System.Boolean invalidateChildren

    Specified if child controls should also be invalidated.

    InvalidateDeactivatedCurrentCell(Int32, Int32, Rectangle)

    This is called from Deactivate(Boolean) method of the CurrentCell after the current cell was deactivated. The default version of this methods checks Model.Options.RefreshCurrentCellBehavior and invalidates the grid area (either the whole row, the cell or nothing) as needed.

    Declaration
    protected virtual void InvalidateDeactivatedCurrentCell(int rowIndex, int colIndex, Rectangle savedBounds)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index

    System.Int32 colIndex

    The column index

    System.Drawing.Rectangle savedBounds

    The current cell bounds before it was deactivated.

    InvalidateRange(GridRangeInfo)

    Invalidates the region of the grid control specified with a range of cells and causes a paint message to be sent to the control.

    Declaration
    public void InvalidateRange(GridRangeInfo range)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range that defines the region to be invalidated.

    InvalidateRange(GridRangeInfo, GridRangeOptions)

    Invalidates the region of the grid control specified with a range of cells and causes a paint message to be sent to the control.

    Declaration
    public void InvalidateRange(GridRangeInfo range, GridRangeOptions options)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range that defines the region to be invalidated.

    GridRangeOptions options

    Options that indicate if method should enlarge the affected range of cells to include covered and floating cells.

    InvertRect(Graphics, Rectangle)

    Inverts a given area on the specified System.Drawing.Graphics canvas.

    Declaration
    public void InvertRect(Graphics g, Rectangle r)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Drawing.Rectangle r

    A System.Drawing.Rectangle to invert.

    IsDesignMode()

    Gets a value that indicates if the grid is in design mode.

    Declaration
    public bool IsDesignMode()
    Returns
    Type Description
    System.Boolean

    Returns System.Component.DesignMode

    IsInputChar(Char)

    Determines if a character is an input character that the control recognizes.

    Declaration
    protected override bool IsInputChar(char charCode)
    Parameters
    Type Name Description
    System.Char charCode

    The character to test.

    Returns
    Type Description
    System.Boolean

    true if the character should be sent directly to the control and not preprocessed; otherwise, false.

    IsInputKey(Keys)

    Determines whether the specified key is a regular input key or a special key that requires preprocessing.

    Declaration
    protected override bool IsInputKey(Keys keyData)
    Parameters
    Type Name Description
    System.Windows.Forms.Keys keyData

    One of the System.Windows.Forms.Keys values.

    Returns
    Type Description
    System.Boolean

    true if the specified key is a regular input key; otherwise, false.

    IsRightToLeft()

    Checks for this.RightToLeft == RightToLeft.Yes;

    Declaration
    public bool IsRightToLeft()
    Returns
    Type Description
    System.Boolean

    True if text is drawn from right to left.

    IsShowCurrentRow(Int32)

    Determines if the current cell is shown at the specified row. Cell renderers call this virtual function to determine if a cell button should be shown when ShowCurrentRow is specified.

    Declaration
    public virtual bool IsShowCurrentRow(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index to be checked.

    Returns
    Type Description
    System.Boolean

    True if this row belongs the current row.

    Remarks

    The GridDataBoundGrid overrides this method and checks whether the specified row belongs to the current record. This is not necessarily the same row since with a data bound grid, a record can show values in several rows (Quicken-like display).

    IsTouchOverSelectionBubbles(ref Point)

    Used to determine whether the touch over the bubble or not.

    Declaration
    protected bool IsTouchOverSelectionBubbles(ref Point point)
    Parameters
    Type Name Description
    System.Drawing.Point point

    The touch position

    Returns
    Type Description
    System.Boolean

    Returns true if touch over top or bottom bubble, otherwise returns false

    IsVisibleCell(Int32, Int32)

    Used internally.

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

    Index of the row.

    System.Int32 colIndex

    Index of the col.

    Returns
    Type Description
    System.Boolean

    true if [is visible cell] [the specified row index]; otherwise, false.

    MakeClientRange(GridRangeInfo)

    Converts the given range from absolute row and column indexes to client row and column indexes.

    Declaration
    public GridRangeInfo MakeClientRange(GridRangeInfo range)
    Parameters
    Type Name Description
    GridRangeInfo range

    The GridRangeInfo to be converted.

    Returns
    Type Description
    GridRangeInfo

    A GridRangeInfo with client row and column indexes.

    ModelFixedColChanged(Object, GridCountChangedEventArgs)

    Occurs when the fixed column count in the model has changed and the view needs to be refreshed.

    Declaration
    protected virtual void ModelFixedColChanged(object sender, GridCountChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    GridCountChangedEventArgs e

    Event data.

    ModelFixedRowChanged(Object, GridCountChangedEventArgs)

    Occurs when the fixed row count in the model has changed and the view needs to be refreshed.

    Declaration
    protected virtual void ModelFixedRowChanged(object sender, GridCountChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    GridCountChangedEventArgs e

    Event data.

    ModelHeaderColChanged(Object, GridCountChangedEventArgs)

    Occurs when the header column count in the model has changed and the view needs to be refreshed.

    Declaration
    protected virtual void ModelHeaderColChanged(object sender, GridCountChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    GridCountChangedEventArgs e

    Event data.

    ModelHeaderRowChanged(Object, GridCountChangedEventArgs)

    Occurs when the header row count in the model has changed and the view needs to be refreshed.

    Declaration
    protected virtual void ModelHeaderRowChanged(object sender, GridCountChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    GridCountChangedEventArgs e

    Event data.

    ModelInvalidateRangeRequest(Object, GridInvalidateRangeRequestEventArgs)

    Handles a InvalidateRangeRequest event from the GridModel and invalidates the range of cells in the current view.

    Declaration
    protected virtual void ModelInvalidateRangeRequest(object sender, GridInvalidateRangeRequestEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    GridInvalidateRangeRequestEventArgs e

    An GridInvalidateRangeRequestEventArgs with event data.

    ModelRefreshRequest(Object, EventArgs)

    Handles a RefreshRequest event from the GridModel and redraws the current view.

    Declaration
    protected virtual void ModelRefreshRequest(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    System.EventArgs e

    An System.EventArgs with event data.

    NotifyCellHighlighted(Int32, Int32, GridStyleInfo)

    When you implement a custom cell type that supports hovering or other cell highlighting features you should call this method to notify the grid about the temporary state of the cell.

    Declaration
    public virtual void NotifyCellHighlighted(int rowIndex, int colIndex, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    GridStyleInfo style

    A reference to the style of the cell.

    Remarks

    By default the method has no functionality. With a GridGroupingControl however, the grid can save the Element associated with the rowindex and check the state again at a later time when ListChanged notifications were handled and rows possibly shifted up or down.

    NotifyCurrentCellChanged()

    This method is called from GridCellRendererBase.NotifyCurrentCellChanged. The default implementation of this virtual method raises the GridCurrentCell.CellChanged event indicating the contents of the current cell have been changed (e.g. in response to a TextBox.Changed event).

    Declaration
    protected virtual void NotifyCurrentCellChanged()
    Remarks

    If you have implemented custom behavior which alters the content of the grid and current cell after a CurrentCellChanging event and you do not want a CurrentCellChanged event to be raised you can override this method and thereby avoid the event being raised.

    NotifyCurrentCellControlPreProcessMessage(ref Message)

    Called from the PreProcessMessage method of the control associated with the current cell. Returns true if the message was handled and the control should not process the message any further.

    Declaration
    public virtual bool NotifyCurrentCellControlPreProcessMessage(ref Message msg)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg

    The message.

    Returns
    Type Description
    System.Boolean

    True if the message was handled and should not be processed by the control.

    NotifyCurrentCellControlWndProc(ref Message)

    Called from the WndProc method of the control associated with the current cell. Returns true if the message was handled and the control should not process the message any further.

    Declaration
    public bool NotifyCurrentCellControlWndProc(ref Message msg)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg

    The message.

    Returns
    Type Description
    System.Boolean

    True if the message was handled and should not be processed by the control.

    NotifySelectionFrameChanged(Graphics)

    Used internally.

    Declaration
    public void NotifySelectionFrameChanged(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    NotifySelectionFrameChanging(Graphics)

    Used internally.

    Declaration
    public void NotifySelectionFrameChanging(Graphics g)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    OnAutoScrollingChanged(EventArgs)

    Raise the OnAutoScrollingChanged(EventArgs) method.

    Declaration
    protected override void OnAutoScrollingChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    A System.EventArgs that contains the event data.

    Overrides
    ScrollControl.OnAutoScrollingChanged(EventArgs)

    OnBackgroundImageChanged(EventArgs)

    Overridden to set the background image for the grid.

    Declaration
    protected override void OnBackgroundImageChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.EventArgs contains the event data.

    OnBeforePaint(EventArgs)

    Called before the Paint method is painting the grid.

    Declaration
    protected virtual void OnBeforePaint(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Empty event args.

    OnCanApplyThemeChanged(Boolean)

    Helps to override the CanApplyTheme property settings

    Declaration
    public override void OnCanApplyThemeChanged(bool canApplyTheme)
    Parameters
    Type Name Description
    System.Boolean canApplyTheme
    Overrides
    BaseControl.OnCanApplyThemeChanged(Boolean)

    OnCancelMode(EventArgs)

    Raise the OnCancelMode(EventArgs) method.

    Declaration
    protected override void OnCancelMode(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    A System.EventArgs that contains the event data.

    Overrides
    ScrollControl.OnCancelMode(EventArgs)

    OnCanOverrideStyleChanged(Boolean)

    Helps to override the CanOverriderStyle property settings

    Declaration
    public override void OnCanOverrideStyleChanged(bool canOverrideStyle)
    Parameters
    Type Name Description
    System.Boolean canOverrideStyle
    Overrides
    BaseControl.OnCanOverrideStyleChanged(Boolean)

    OnCellButtonClicked(GridCellButtonClickedEventArgs)

    Raises the CellButtonClicked event.

    Declaration
    protected virtual void OnCellButtonClicked(GridCellButtonClickedEventArgs e)
    Parameters
    Type Name Description
    GridCellButtonClickedEventArgs e

    A GridCellButtonClickedEventArgs that contains the event data.

    OnCellCancelMode(GridCellMouseEventArgs)

    Raises the CellCancelMode event.

    Declaration
    protected virtual void OnCellCancelMode(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    OnCellClick(GridCellClickEventArgs)

    Raises the cancelable CellClick event.

    Declaration
    protected virtual void OnCellClick(GridCellClickEventArgs e)
    Parameters
    Type Name Description
    GridCellClickEventArgs e

    A GridCellClickEventArgs that contains the event data.

    OnCellCursor(GridCellCursorEventArgs)

    Raises the CellCursor event.

    Declaration
    protected virtual void OnCellCursor(GridCellCursorEventArgs e)
    Parameters
    Type Name Description
    GridCellCursorEventArgs e

    A GridCellCursorEventArgs that contains the event data.

    OnCellDoubleClick(GridCellClickEventArgs)

    Raises the cancelable CellClick event.

    Declaration
    protected virtual void OnCellDoubleClick(GridCellClickEventArgs e)
    Parameters
    Type Name Description
    GridCellClickEventArgs e

    A GridCellClickEventArgs that contains the event data.

    OnCellDrawn(GridDrawCellEventArgs)

    Raises the CellDrawn event.

    Declaration
    protected virtual void OnCellDrawn(GridDrawCellEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellEventArgs e

    A GridDrawCellEventArgs that contains the event data.

    OnCellHitTest(GridCellHitTestEventArgs)

    Raises the CellHitTest event.

    Declaration
    protected virtual void OnCellHitTest(GridCellHitTestEventArgs e)
    Parameters
    Type Name Description
    GridCellHitTestEventArgs e

    A GridCellHitTestEventArgs that contains the event data.

    OnCellMouseDown(GridCellMouseEventArgs)

    Raises the CellMouseDown event.

    Declaration
    protected virtual void OnCellMouseDown(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    OnCellMouseHover(GridCellMouseEventArgs)

    Raises the CellMouseHover event.

    Declaration
    protected virtual void OnCellMouseHover(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    OnCellMouseHoverEnter(GridCellMouseEventArgs)

    Raises the CellMouseHoverEnter event.

    Declaration
    protected virtual void OnCellMouseHoverEnter(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    OnCellMouseHoverLeave(GridCellMouseEventArgs)

    Raises the CellMouseHoverLeave event.

    Declaration
    protected virtual void OnCellMouseHoverLeave(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    OnCellMouseMove(GridCellMouseEventArgs)

    Raises the CellMouseMove event.

    Declaration
    protected virtual void OnCellMouseMove(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    OnCellMouseUp(GridCellMouseEventArgs)

    Raises the CellMouseUp event.

    Declaration
    protected virtual void OnCellMouseUp(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    OnCheckBoxClick(GridCellClickEventArgs)

    Raises the cancelable CheckBoxClick event.

    Declaration
    protected virtual void OnCheckBoxClick(GridCellClickEventArgs e)
    Parameters
    Type Name Description
    GridCellClickEventArgs e

    A GridCellClickEventArgs that contains the event data.

    OnClientSizeChanged(EventArgs)

    Raises the OnClientSizeChanged(EventArgs) event.

    Declaration
    protected override void OnClientSizeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    OnCommentTipShowing(CommentTipShowingEventArgs)

    Raises the CommentTipShowing event.

    Declaration
    protected virtual void OnCommentTipShowing(CommentTipShowingEventArgs e)
    Parameters
    Type Name Description
    CommentTipShowingEventArgs e

    The CommentTipShowingEventArgs that contains event data.

    OnCommentTipShown(CommentTipShownEventArgs)

    Raises the CommentTipShown event.

    Declaration
    protected virtual void OnCommentTipShown(CommentTipShownEventArgs e)
    Parameters
    Type Name Description
    CommentTipShownEventArgs e

    An CommentTipShownEventArgs that contains the event data.

    OnControlAdded(ControlEventArgs)

    Declaration
    protected override void OnControlAdded(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e
    Overrides
    ScrollControl.OnControlAdded(ControlEventArgs)

    OnControlGotFocus()

    Declaration
    protected override void OnControlGotFocus()
    Overrides
    ScrollControl.OnControlGotFocus()

    OnControlLostFocus()

    Declaration
    protected override void OnControlLostFocus()
    Overrides
    ScrollControl.OnControlLostFocus()

    OnCreateControl()

    Raises the System.Windows.Forms.Control.CreateControl method.

    Declaration
    protected override void OnCreateControl()
    Exceptions
    Type Condition
    System.NotSupportedException

    if

    control is used in windowless mode.

    OnCreatedNewControl(GridControlBase, Int32, Int32)

    This virtual method is called after CreateNewControl(Control, Int32, Int32) successfully created a new control and lets you initialize properties for the new control before it is displayed.

    Declaration
    protected virtual void OnCreatedNewControl(GridControlBase grid, int row, int column)
    Parameters
    Type Name Description
    GridControlBase grid

    The new grid control.

    System.Int32 row

    The splitter row.

    System.Int32 column

    The splitter column.

    OnCurrentCellAcceptedChanges(CancelEventArgs)

    Raises the cancelable CurrentCellAcceptedChanges event.

    Declaration
    protected virtual void OnCurrentCellAcceptedChanges(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    An System.EventArgs that contains the event data.

    OnCurrentCellActivated(EventArgs)

    Raises the CurrentCellActivated event.

    Declaration
    protected virtual void OnCurrentCellActivated(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    A System.EventArgs that contains the event data.

    OnCurrentCellActivateFailed(GridCurrentCellActivateFailedEventArgs)

    Raises the CurrentCellActivateFailed event.

    Declaration
    protected virtual void OnCurrentCellActivateFailed(GridCurrentCellActivateFailedEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellActivateFailedEventArgs e

    A GridCurrentCellActivateFailedEventArgs that contains the event data.

    OnCurrentCellActivating(GridCurrentCellActivatingEventArgs)

    Raises the CurrentCellActivating event.

    Declaration
    protected virtual void OnCurrentCellActivating(GridCurrentCellActivatingEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellActivatingEventArgs e

    A GridCurrentCellActivatingEventArgs that contains the event data.

    OnCurrentCellChanged(EventArgs)

    Raises the CurrentCellChanged event.

    Declaration
    protected virtual void OnCurrentCellChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    A System.EventArgs that contains the event data.

    OnCurrentCellChanging(CancelEventArgs)

    Raises the CurrentCellChanging event.

    Declaration
    protected virtual void OnCurrentCellChanging(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    A System.ComponentModel.CancelEventArgs that contains the event data.

    OnCurrentCellCloseDropDown(PopupClosedEventArgs)

    Raises the CurrentCellCloseDropDown event.

    Declaration
    protected virtual void OnCurrentCellCloseDropDown(PopupClosedEventArgs e)
    Parameters
    Type Name Description
    PopupClosedEventArgs e

    A PopupClosedEventArgs that contains the event data.

    OnCurrentCellConfirmChangesFailed(EventArgs)

    Raises the CurrentCellConfirmChangesFailed event.

    Declaration
    protected virtual void OnCurrentCellConfirmChangesFailed(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    OnCurrentCellControlDoubleClick(ControlEventArgs)

    Raises the CurrentCellControlDoubleClick event.

    Declaration
    protected virtual void OnCurrentCellControlDoubleClick(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e

    An System.Windows.Form.ControlEventArgs that contains the event data.

    OnCurrentCellControlGotFocus(ControlEventArgs)

    Raises the CurrentCellControlGotFocus event.

    Declaration
    protected virtual void OnCurrentCellControlGotFocus(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e

    A System.Windows.Form.ControlEventArgs that contains the event data.

    OnCurrentCellControlKeyMessage(GridCurrentCellControlKeyMessageEventArgs)

    Raises the CurrentCellControlKeyMessage event.

    Declaration
    protected virtual void OnCurrentCellControlKeyMessage(GridCurrentCellControlKeyMessageEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellControlKeyMessageEventArgs e

    A GridCurrentCellControlKeyMessageEventArgs that contains the event data.

    OnCurrentCellControlLostFocus(ControlEventArgs)

    Raises the CurrentCellControlLostFocus event.

    Declaration
    protected virtual void OnCurrentCellControlLostFocus(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e

    A System.Windows.Form.ControlEventArgs that contains the event data.

    OnCurrentCellDeactivated(GridCurrentCellDeactivatedEventArgs)

    Raises the CurrentCellDeactivated event.

    Declaration
    protected virtual void OnCurrentCellDeactivated(GridCurrentCellDeactivatedEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellDeactivatedEventArgs e

    A GridCurrentCellDeactivatedEventArgs that contains the event data.

    OnCurrentCellDeactivateFailed(EventArgs)

    Raises the CurrentCellDeactivateFailed event.

    Declaration
    protected virtual void OnCurrentCellDeactivateFailed(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    OnCurrentCellDeactivating(CancelEventArgs)

    Raises the CurrentCellDeactivating event.

    Declaration
    protected virtual void OnCurrentCellDeactivating(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    An System.EventArgs that contains the event data.

    OnCurrentCellDeleting(CancelEventArgs)

    Raises the CurrentCellDeleting event.

    Declaration
    protected virtual void OnCurrentCellDeleting(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    A System.ComponentModel.CancelEventArgs that contains the event data.

    OnCurrentCellEditingComplete(EventArgs)

    Raises the CurrentCellEditingComplete event.

    Declaration
    protected virtual void OnCurrentCellEditingComplete(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    OnCurrentCellErrorMessage(GridCurrentCellErrorMessageEventArgs)

    Raises the CurrentCellErrorMessage event.

    Declaration
    protected virtual void OnCurrentCellErrorMessage(GridCurrentCellErrorMessageEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellErrorMessageEventArgs e

    A GridCurrentCellErrorMessageEventArgs that contains the event data.

    OnCurrentCellInitializeControlText(GridCurrentCellInitializeControlTextEventArgs)

    Raises the CurrentCellInitializeControlText event.

    Declaration
    protected virtual void OnCurrentCellInitializeControlText(GridCurrentCellInitializeControlTextEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellInitializeControlTextEventArgs e

    A GridCurrentCellInitializeControlTextEventArgs that contains the event data.

    OnCurrentCellKeyDown(KeyEventArgs)

    Raises the CurrentCellKeyDown event.

    Declaration
    public virtual void OnCurrentCellKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs e

    An System.Windows.Form.KeyEventArgsThat contains the event data.

    OnCurrentCellKeyPress(KeyPressEventArgs)

    Raises the CurrentCellKeyPress event.

    Declaration
    public virtual void OnCurrentCellKeyPress(KeyPressEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyPressEventArgs e

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

    OnCurrentCellKeyUp(KeyEventArgs)

    Raises the CurrentCellKeyUp event.

    Declaration
    public virtual void OnCurrentCellKeyUp(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs e

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

    OnCurrentCellMoved(GridCurrentCellMovedEventArgs)

    Raises the CurrentCellMoved event.

    Declaration
    protected virtual void OnCurrentCellMoved(GridCurrentCellMovedEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellMovedEventArgs e

    A GridCurrentCellMovedEventArgs that contains the event data.

    OnCurrentCellMoveFailed(GridCurrentCellMoveFailedEventArgs)

    Raises the CurrentCellMoveFailed event.

    Declaration
    protected virtual void OnCurrentCellMoveFailed(GridCurrentCellMoveFailedEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellMoveFailedEventArgs e

    A GridCurrentCellMoveFailedEventArgs that contains the event data.

    OnCurrentCellMoving(GridCurrentCellMovingEventArgs)

    Raises the CurrentCellMoving event.

    Declaration
    protected virtual void OnCurrentCellMoving(GridCurrentCellMovingEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellMovingEventArgs e

    A GridCurrentCellMovingEventArgs that contains the event data.

    OnCurrentCellRejectedChanges(EventArgs)

    Raises the CurrentCellRejectedChanges event.

    Declaration
    protected virtual void OnCurrentCellRejectedChanges(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    OnCurrentCellShowedDropDown(EventArgs)

    Raises the CurrentCellShowedDropDown event.

    Declaration
    protected virtual void OnCurrentCellShowedDropDown(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    OnCurrentCellShowingDropDown(GridCurrentCellShowingDropDownEventArgs)

    Raises the CurrentCellShowingDropDown event.

    Declaration
    protected virtual void OnCurrentCellShowingDropDown(GridCurrentCellShowingDropDownEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellShowingDropDownEventArgs e

    A GridCurrentCellShowingDropDownEventArgs that contains the event data.

    OnCurrentCellStartEditing(CancelEventArgs)

    Raises the CurrentCellStartEditing event.

    Declaration
    protected virtual void OnCurrentCellStartEditing(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    A System.ComponentModel.CancelEventArgs that contains the event data.

    OnCurrentCellValidated(EventArgs)

    Raises the CurrentCellValidated event.

    Declaration
    protected virtual void OnCurrentCellValidated(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    OnCurrentCellValidateString(GridCurrentCellValidateStringEventArgs)

    Called from OnValidate and checks whether the specified text is valid and raises the CurrentCellValidateString event.

    Declaration
    public virtual void OnCurrentCellValidateString(GridCurrentCellValidateStringEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellValidateStringEventArgs e

    The event data with text to be validated.

    Remarks

    True if text if valid; False otherwise. This also works for limiting the keyboard input, e.g. only digits. Called after the user presses a key and before it is accepted.

    Examples

    Don't allow "-" to be typed.

            public override void OnCurrentCellValidateString(GridCurrentCellValidateStringEventArgs e)
            {
                TraceUtil.TraceCurrentMethodInfoIf(Switches.CellRenderer.TraceVerbose, e);
                if (e.Text.IndexOf("-") != -1)
                    e.Cancel = true;
                base.OnCurrentCellValidateString(e);
            }

    OnCurrentCellValidating(CancelEventArgs)

    Raises the cancelable CurrentCellValidating event.

    Declaration
    protected virtual void OnCurrentCellValidating(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    An System.ComponentModel.CancelEventArgs that contains the event data.

    OnDeactivated(EventArgs)

    Declaration
    protected override void OnDeactivated(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e
    Overrides
    ScrollControl.OnDeactivated(EventArgs)

    OnDragDrop(DragEventArgs)

    Raises the System.Windows.Forms.Control.DragDrop event.

    Declaration
    protected override void OnDragDrop(DragEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.DragEventArgs e

    An System.Windows.Forms.DragEventArgsthat contains event data.

    OnDragEnter(DragEventArgs)

    Raises the System.Windows.Forms.Control.DragEnter event.

    Declaration
    protected override void OnDragEnter(DragEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.DragEventArgs e

    An System.Windows.Forms.DragEventArgsthat contains event data.

    OnDragLeave(EventArgs)

    Raises the System.Windows.Forms.Control.DragLeave event.

    Declaration
    protected override void OnDragLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.Windows.Forms.DragEventArgsthat contains event data.

    OnDragOver(DragEventArgs)

    Raises the OnDragOver(DragEventArgs) event.

    Declaration
    protected override void OnDragOver(DragEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.DragEventArgs e

    An System.Windows.Forms.DragEventArgsthat contains event data.

    Overrides
    ScrollControl.OnDragOver(DragEventArgs)

    OnDrawCell(GridDrawCellEventArgs)

    Raises the DrawCell event.

    Declaration
    protected virtual void OnDrawCell(GridDrawCellEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellEventArgs e

    A GridDrawCellEventArgs that contains the event data.

    OnDrawCellBackground(GridDrawCellBackgroundEventArgs)

    Raises the DrawCellBackground event.

    Declaration
    protected virtual void OnDrawCellBackground(GridDrawCellBackgroundEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellBackgroundEventArgs e

    A GridDrawCellBackgroundEventArgs that contains the event data.

    OnDrawCellButton(GridDrawCellButtonEventArgs)

    Raises the DrawCellButton event.

    Declaration
    protected virtual void OnDrawCellButton(GridDrawCellButtonEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellButtonEventArgs e

    A GridDrawCellButtonEventArgs that contains the event data.

    OnDrawCellButtonBackground(GridDrawCellButtonBackgroundEventArgs)

    Raises the DrawCellButtonBackground event.

    Declaration
    protected virtual void OnDrawCellButtonBackground(GridDrawCellButtonBackgroundEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellButtonBackgroundEventArgs e

    A GridDrawCellButtonBackgroundEventArgs that contains the event data.

    OnDrawCellDisplayText(GridDrawCellDisplayTextEventArgs)

    Raises the DrawCellDisplayText event.

    Declaration
    protected virtual void OnDrawCellDisplayText(GridDrawCellDisplayTextEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellDisplayTextEventArgs e

    A GridDrawCellDisplayTextEventArgs that contains the event data.

    OnDrawCellFrameAppearance(GridDrawCellBackgroundEventArgs)

    Raises the DrawCellFrameAppearance event.

    Declaration
    protected virtual void OnDrawCellFrameAppearance(GridDrawCellBackgroundEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellBackgroundEventArgs e

    A GridDrawCellBackgroundEventArgs that contains the event data.

    OnDrawClientRowCol(Int32, Int32, Int32, Int32, Graphics, Rectangle)

    Occurs when the grid drawing engine wants to draw the specified range of visible cells that need repainting.

    Declaration
    public virtual void OnDrawClientRowCol(int topRow, int leftCol, int bottomRow, int rightCol, Graphics g, Rectangle rectClip)
    Parameters
    Type Name Description
    System.Int32 topRow

    The top client row.

    System.Int32 leftCol

    The left client column.

    System.Int32 bottomRow

    The bottom client row.

    System.Int32 rightCol

    The right client column.

    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Drawing.Rectangle rectClip

    The client rectangle with the clipping bounds.

    Remarks

    The row and index positions are relative to the top and left column.

    GetRow(Int32) and GetCol(Int32) let you convert client row and column positions into absolute row and column indexes.

    OnDrawCommentIndicator(DrawCommentIndicatorEventArgs)

    Raises the DrawCommentIndicator event.

    Declaration
    protected virtual void OnDrawCommentIndicator(DrawCommentIndicatorEventArgs e)
    Parameters
    Type Name Description
    DrawCommentIndicatorEventArgs e

    An DrawCommentIndicatorEventArgs that contains the event data.

    OnDrawCurrentCellBorder(GridDrawCurrentCellBorderEventArgs)

    Raises the DrawCurrentCellBorder event.

    Declaration
    protected virtual void OnDrawCurrentCellBorder(GridDrawCurrentCellBorderEventArgs e)
    Parameters
    Type Name Description
    GridDrawCurrentCellBorderEventArgs e

    A GridDrawCurrentCellBorderEventArgs that contains the event data.

    OnDrawItem(Graphics, Int32, Int32, Rectangle, GridStyleInfo)

    You should override OnDrawCell(GridDrawCellEventArgs) instead.

    Declaration
    public virtual void OnDrawItem(Graphics g, int rowIndex, int colIndex, Rectangle rectItem, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context of the canvas.

    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Drawing.Rectangle rectItem

    The System.Drawing.Rectangle with the bounds.

    GridStyleInfo style

    The GridStyleInfo object that holds cell information.

    OnEnabledChanged(EventArgs)

    Declaration
    protected override void OnEnabledChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnEnsurePaintCodeJitted()

    Releases all resources used by System.Drawing.

    Declaration
    protected override void OnEnsurePaintCodeJitted()
    Overrides
    ScrollControl.OnEnsurePaintCodeJitted()

    OnEnter(EventArgs)

    Declaration
    protected override void OnEnter(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e
    Overrides
    ScrollControl.OnEnter(EventArgs)

    OnFillRectangleHook(GridFillRectangleHookEventArgs)

    Raises the FillRectangleHook event.

    Declaration
    protected virtual void OnFillRectangleHook(GridFillRectangleHookEventArgs e)
    Parameters
    Type Name Description
    GridFillRectangleHookEventArgs e

    A GridFillRectangleHookEventArgs that contains the event data.

    OnGridBoundsChanged(EventArgs)

    Raises the GridBoundsChanged event.

    Declaration
    protected virtual void OnGridBoundsChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    A System.EventArgs that contains the event data.

    OnGridControlMouseDown(CancelMouseEventArgs)

    Raises the GridControlMouseDown event.

    Declaration
    protected virtual void OnGridControlMouseDown(CancelMouseEventArgs e)
    Parameters
    Type Name Description
    CancelMouseEventArgs e

    A CancelMouseEventArgs that contains the event data.

    OnGridControlMouseMove(CancelMouseEventArgs)

    Raises the GridControlMouseMove event.

    Declaration
    protected virtual void OnGridControlMouseMove(CancelMouseEventArgs e)
    Parameters
    Type Name Description
    CancelMouseEventArgs e

    A CancelMouseEventArgs that contains the event data.

    OnGridControlMouseUp(CancelMouseEventArgs)

    Raises the GridControlMouseUp event.

    Declaration
    protected virtual void OnGridControlMouseUp(CancelMouseEventArgs e)
    Parameters
    Type Name Description
    CancelMouseEventArgs e

    A CancelMouseEventArgs that contains the event data.

    OnGridValidating(CancelEventArgs)

    This is called from OnValidating(CancelEventArgs) after the grid has checked that Validating events should be passed on and not ignored.

    Declaration
    protected virtual void OnGridValidating(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    The event data.

    OnHScroll(Object, ScrollEventArgs)

    Listens for the horizontal scrollbar's scroll event.

    Declaration
    protected override void OnHScroll(object sender, ScrollEventArgs se)
    Parameters
    Type Name Description
    System.Object sender

    A System.Object that contains data about the control.

    System.Windows.Forms.ScrollEventArgs se

    A System.Windows.Forms.ScrollEventArgs that contains the event data.

    Overrides
    ScrollControl.OnHScroll(Object, ScrollEventArgs)

    OnHScrollPixelPosChanged(GridScrollPositionChangedEventArgs)

    Raises the HScrollPixelPosChanged event.

    Declaration
    protected virtual void OnHScrollPixelPosChanged(GridScrollPositionChangedEventArgs e)
    Parameters
    Type Name Description
    GridScrollPositionChangedEventArgs e

    An System.EventArgs that contains the event data.

    OnHScrollPixelPosChanging(GridScrollPositionChangingEventArgs)

    Raises the HScrollPixelPosChanging event.

    Declaration
    protected virtual void OnHScrollPixelPosChanging(GridScrollPositionChangingEventArgs e)
    Parameters
    Type Name Description
    GridScrollPositionChangingEventArgs e

    An System.EventArgs that contains the event data.

    OnInvalidated(InvalidateEventArgs)

    Raises the System.Windows.Forms.Control.Invalidated event.

    Declaration
    protected override void OnInvalidated(InvalidateEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.InvalidateEventArgs e

    An System.Windows.Forms.InvalidateEventArgs that contains the event data.

    Overrides
    ScrollControl.OnInvalidated(InvalidateEventArgs)

    OnKeyDown(KeyEventArgs)

    Raises the System.Windows.Forms.Control.KeyDown event.

    Declaration
    protected override void OnKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs e

    An System.Windows.Forms.KeyEventArgs that contains the event data.

    OnKeyPress(KeyPressEventArgs)

    Raises the System.Windows.Forms.Control.KeyPress event.

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

    An System.Windows.Forms.KeyEventArgs that contains the event data.

    OnKeyUp(KeyEventArgs)

    Raises the System.Windows.Forms.Control.KeyUp event.

    Declaration
    protected override void OnKeyUp(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs e

    An System.Windows.Forms.KeyEventArgs that contains the event data.

    OnLayout(LayoutEventArgs)

    Raises the System.Windows.Forms.OnLayout event.

    Declaration
    protected override void OnLayout(LayoutEventArgs le)
    Parameters
    Type Name Description
    System.Windows.Forms.LayoutEventArgs le

    An System.Windows.Forms.LayoutEventArgsthat contains event data.

    OnLeftColChanged(GridRowColIndexChangedEventArgs)

    Raises the LeftColChanged event.

    Declaration
    protected virtual void OnLeftColChanged(GridRowColIndexChangedEventArgs e)
    Parameters
    Type Name Description
    GridRowColIndexChangedEventArgs e

    An GridRowColIndexChangedEventArgs that contains the event data.

    OnLeftColChanging(GridRowColIndexChangingEventArgs)

    Raises the LeftColChanging event.

    Declaration
    protected virtual void OnLeftColChanging(GridRowColIndexChangingEventArgs e)
    Parameters
    Type Name Description
    GridRowColIndexChangingEventArgs e

    An GridRowColIndexChangingEventArgs that contains the event data.

    OnModelChanged(EventArgs)

    Raises the ModelChanged event.

    Declaration
    protected virtual void OnModelChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    A System.EventArgs that contains the event data.

    OnMouseActivating(CancelEventArgs)

    Raises the MouseActivating event.

    Declaration
    protected virtual void OnMouseActivating(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    A System.ComponentModel.CancelEventArgs that contains the event data.

    OnMouseDown(MouseEventArgs)

    Invoked when the user performs the mouse click.

    Declaration
    protected override void OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    An System.Windows.Form.MouseEventArgsthat contains the event data.

    Overrides
    ScrollControl.OnMouseDown(MouseEventArgs)

    OnMouseMove(MouseEventArgs)

    Invoked when the user moves the mouse.

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    An System.Windows.Form.MouseEventArgsthat contains the event data.

    Overrides
    ScrollControl.OnMouseMove(MouseEventArgs)

    OnMouseUp(MouseEventArgs)

    Invoked when the user releases the mouse click.

    Declaration
    protected override void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    An System.Windows.Form.MouseEventArgsthat contains the event data.

    Overrides
    ScrollControl.OnMouseUp(MouseEventArgs)

    OnMouseWheel(MouseEventArgs)

    Handles mouse wheel processing for our scrollbars.

    Declaration
    protected override void OnMouseWheel(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs that contains the event data.

    Overrides
    ScrollControl.OnMouseWheel(MouseEventArgs)

    OnMoveCurrentCellDirection(GridMoveCurrentCellDirectionEventArgs)

    Raises the MoveCurrentCellDirection event.

    Declaration
    protected virtual void OnMoveCurrentCellDirection(GridMoveCurrentCellDirectionEventArgs e)
    Parameters
    Type Name Description
    GridMoveCurrentCellDirectionEventArgs e

    A GridMoveCurrentCellDirectionEventArgs that contains the event data.

    OnPaint(PaintEventArgs)

    Raises the OnPaint(PaintEventArgs) event.

    Declaration
    protected override void OnPaint(PaintEventArgs pe)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs pe

    An System.Windows.Forms.PaintEventArgs that contains event data.

    Overrides
    ScrollControl.OnPaint(PaintEventArgs)

    OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs)

    Raises the PrepareViewStyleInfo event.

    Declaration
    protected virtual void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
    Parameters
    Type Name Description
    GridPrepareViewStyleInfoEventArgs e

    A GridPrepareViewStyleInfoEventArgs that contains the event data.

    OnPrintingModeChanged(EventArgs)

    Raises the PrintingModeChanged event.

    Declaration
    protected virtual void OnPrintingModeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    A GridPrepareViewStyleInfoEventArgs that contains the event data.

    OnPushButtonClick(GridCellPushButtonClickEventArgs)

    Raises the PushButtonClick event.

    Declaration
    protected virtual void OnPushButtonClick(GridCellPushButtonClickEventArgs e)
    Parameters
    Type Name Description
    GridCellPushButtonClickEventArgs e

    A GridCellPushButtonClickEventArgs that contains the event data.

    OnQueryCanOleDragRange(GridQueryCanOleDragRangeEventArgs)

    Raises the QueryCanOleDragRange event.

    Declaration
    protected virtual void OnQueryCanOleDragRange(GridQueryCanOleDragRangeEventArgs e)
    Parameters
    Type Name Description
    GridQueryCanOleDragRangeEventArgs e

    An GridQueryCanOleDragRangeEventArgs that contains the event data.

    OnQueryCreateCellTextBox(GridQueryCreateCellTextBoxEventArgs)

    Raises the QueryCreateCellTextBox event.

    Declaration
    protected virtual void OnQueryCreateCellTextBox(GridQueryCreateCellTextBoxEventArgs e)
    Parameters
    Type Name Description
    GridQueryCreateCellTextBoxEventArgs e

    A GridQueryCreateCellTextBoxEventArgs that contains the event data.

    OnQueryNextCurrentCellPosition(GridQueryNextCurrentCellPositionEventArgs)

    Raises the QueryNextCurrentCellPosition event.

    Declaration
    protected virtual void OnQueryNextCurrentCellPosition(GridQueryNextCurrentCellPositionEventArgs e)
    Parameters
    Type Name Description
    GridQueryNextCurrentCellPositionEventArgs e

    A GridQueryNextCurrentCellPositionEventArgs that contains the event data.

    OnQueryScrollCellInView(GridQueryScrollCellInViewEventArgs)

    Raises the QueryScrollCellInView event.

    Declaration
    protected virtual void OnQueryScrollCellInView(GridQueryScrollCellInViewEventArgs e)
    Parameters
    Type Name Description
    GridQueryScrollCellInViewEventArgs e

    A GridQueryScrollCellInViewEventArgs that contains the event data.

    OnResizingColumns(GridResizingColumnsEventArgs)

    Raises the ResizingColumns event.

    Declaration
    protected virtual void OnResizingColumns(GridResizingColumnsEventArgs e)
    Parameters
    Type Name Description
    GridResizingColumnsEventArgs e

    An GridResizingColumnsEventArgs that contains the event data.

    OnResizingRows(GridResizingRowsEventArgs)

    Raises the ResizingRows event.

    Declaration
    protected virtual void OnResizingRows(GridResizingRowsEventArgs e)
    Parameters
    Type Name Description
    GridResizingRowsEventArgs e

    An GridResizingRowsEventArgs that contains the event data.

    OnScrollControlMouseDown(CancelMouseEventArgs)

    Raise the ScrollControlMouseDown method.

    Declaration
    protected override void OnScrollControlMouseDown(CancelMouseEventArgs e)
    Parameters
    Type Name Description
    CancelMouseEventArgs e

    A System.EventArgs that contains the event data.

    Overrides
    ScrollControl.OnScrollControlMouseDown(CancelMouseEventArgs)

    OnScrollInfoChanged(EventArgs)

    Raises the CurrentCellMoving event.

    Declaration
    protected virtual void OnScrollInfoChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An that contains event data.

    OnScrollTipFeedback(ScrollTipFeedbackEventArgs)

    Raises the ScrollTip event.

    Declaration
    protected override void OnScrollTipFeedback(ScrollTipFeedbackEventArgs e)
    Parameters
    Type Name Description
    ScrollTipFeedbackEventArgs e
    Overrides
    ScrollControl.OnScrollTipFeedback(ScrollTipFeedbackEventArgs)

    OnSelectionDragged(GridSelectionDragEventArgs)

    Raises the SelectionDragged event.

    Declaration
    protected virtual void OnSelectionDragged(GridSelectionDragEventArgs e)
    Parameters
    Type Name Description
    GridSelectionDragEventArgs e

    An GridSelectionDragEventArgs that contains the event data.

    OnSelectionDragging(GridSelectionDragEventArgs)

    Raises the SelectionDragging event.

    Declaration
    protected virtual void OnSelectionDragging(GridSelectionDragEventArgs e)
    Parameters
    Type Name Description
    GridSelectionDragEventArgs e

    An GridSelectionDragEventArgs that contains the event data.

    OnSelectionFrameChanged(GraphicsEventArgs)

    Raises the SelectionFrameChanged event.

    Declaration
    protected virtual void OnSelectionFrameChanged(GraphicsEventArgs e)
    Parameters
    Type Name Description
    GraphicsEventArgs e

    A GraphicsEventArgs that contains the event data.

    OnSelectionFrameChanging(GraphicsEventArgs)

    Raises the SelectionFrameChanging event.

    Declaration
    protected virtual void OnSelectionFrameChanging(GraphicsEventArgs e)
    Parameters
    Type Name Description
    GraphicsEventArgs e

    A GraphicsEventArgs that contains the event data.

    OnSizeChanged(EventArgs)

    Raises the OnSizeChanged(EventArgs) event.

    Declaration
    protected override void OnSizeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgsthat contains event data.

    Overrides
    ScrollControl.OnSizeChanged(EventArgs)

    OnSplitterPaneClosing(EventArgs)

    Raises the OnSplitterPaneClosing(EventArgs) event.

    Declaration
    protected override void OnSplitterPaneClosing(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    Overrides
    ScrollControl.OnSplitterPaneClosing(EventArgs)

    OnSupportsTransparentBackColorChanged(EventArgs)

    Raises the SupportsTransparentBackColorChanged event.

    Declaration
    protected virtual void OnSupportsTransparentBackColorChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    A System.EventArgs that contains the event data.

    OnThemeChanged(EventArgs)

    Raises the ThemeChanged event.

    Declaration
    protected virtual void OnThemeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    The OnThemeChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Notes to Inheritors: When overriding OnThemeChanged in a derived class, be sure to call the base class's OnThemeChanged method so that registered delegates receive the event.

    OnThemeNameChanged(String)

    Helps to override the ThemeName property settings

    Declaration
    public override void OnThemeNameChanged(string themeName)
    Parameters
    Type Name Description
    System.String themeName

    ThemeName

    Overrides
    ScrollControl.OnThemeNameChanged(String)

    OnTopRowChanged(GridRowColIndexChangedEventArgs)

    Raises the TopRowChanged event.

    Declaration
    protected virtual void OnTopRowChanged(GridRowColIndexChangedEventArgs e)
    Parameters
    Type Name Description
    GridRowColIndexChangedEventArgs e

    An GridRowColIndexChangedEventArgs that contains the event data.

    OnTopRowChanging(GridRowColIndexChangingEventArgs)

    Raises the TopRowChanging event.

    Declaration
    protected virtual void OnTopRowChanging(GridRowColIndexChangingEventArgs e)
    Parameters
    Type Name Description
    GridRowColIndexChangingEventArgs e

    An GridRowColIndexChangingEventArgs that contains the event data..

    OnTouchPan(Point, Boolean)

    Adjust the HScrollBar and VScrollBar values based on current touch position

    Declaration
    protected override bool OnTouchPan(Point currentTouchPoint, bool isSwipeScroll)
    Parameters
    Type Name Description
    System.Drawing.Point currentTouchPoint

    Current touch position

    System.Boolean isSwipeScroll

    Used to decide the doing swipe operation or pan operation

    Returns
    Type Description
    System.Boolean

    Returns true

    Overrides
    ScrollControl.OnTouchPan(Point, Boolean)

    OnTouchPanBegin(Point)

    Initialize the touch panning operation

    Declaration
    protected override bool OnTouchPanBegin(Point touchBeginPoint)
    Parameters
    Type Name Description
    System.Drawing.Point touchBeginPoint

    Touch begin position

    Returns
    Type Description
    System.Boolean

    return true

    Overrides
    ScrollControl.OnTouchPanBegin(Point)

    OnTouchPanEnd(Point)

    After panning operation completes save the current scroll bar values

    Declaration
    protected override bool OnTouchPanEnd(Point touchEndPoint)
    Parameters
    Type Name Description
    System.Drawing.Point touchEndPoint

    touch end position

    Returns
    Type Description
    System.Boolean

    return true

    Overrides
    ScrollControl.OnTouchPanEnd(Point)

    OnValidating(CancelEventArgs)

    Declaration
    protected override void OnValidating(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e
    Overrides
    ScrollControl.OnValidating(CancelEventArgs)

    OnVisibleChanged(EventArgs)

    Raises the OnVisibleChanged(EventArgs) event.

    Declaration
    protected override void OnVisibleChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    Overrides
    ScrollControl.OnVisibleChanged(EventArgs)

    OnVScrollPixelPosChanged(GridScrollPositionChangedEventArgs)

    Raises the VScrollPixelPosChanged event.

    Declaration
    protected virtual void OnVScrollPixelPosChanged(GridScrollPositionChangedEventArgs e)
    Parameters
    Type Name Description
    GridScrollPositionChangedEventArgs e

    An System.EventArgs that contains the event data.

    OnVScrollPixelPosChanging(GridScrollPositionChangingEventArgs)

    Raises the VScrollPixelPosChanging event.

    Declaration
    protected virtual void OnVScrollPixelPosChanging(GridScrollPositionChangingEventArgs e)
    Parameters
    Type Name Description
    GridScrollPositionChangingEventArgs e

    An System.EventArgs that contains the event data.

    OnWindowScrolled(ScrollWindowEventArgs)

    Raises the WindowScrolled event.

    Declaration
    protected override void OnWindowScrolled(ScrollWindowEventArgs e)
    Parameters
    Type Name Description
    ScrollWindowEventArgs e

    An ScrollWindowEventArgsthat contains event data.

    Overrides
    ScrollControl.OnWindowScrolled(ScrollWindowEventArgs)

    OnWrapCellNextControlInForm(GridWrapCellNextControlInFormEventArgs)

    Raises the WrapCellNextControlInForm event.

    Declaration
    protected virtual void OnWrapCellNextControlInForm(GridWrapCellNextControlInFormEventArgs e)
    Parameters
    Type Name Description
    GridWrapCellNextControlInFormEventArgs e

    A GridWrapCellNextControlInFormEventArgs that contains the event data.

    OutlineCurrentCellHeader(Int32, Int32, ScrollBars)

    Outlines the row and column header for the current cell.

    Declaration
    public void OutlineCurrentCellHeader(int nEditRow, int nEditCol, ScrollBars direction)
    Parameters
    Type Name Description
    System.Int32 nEditRow

    The row index of the current cell.

    System.Int32 nEditCol

    The column index of the current cell.

    System.Windows.Forms.ScrollBars direction

    The direction the current cell moved.

    PointToClient(Point)

    Returns the result of System.Windows.Forms.Control.PointToClient of the parent control with window handle (see GetWindow()).

    Declaration
    public Point PointToClient(Point p)
    Parameters
    Type Name Description
    System.Drawing.Point p

    Screen point.

    Returns
    Type Description
    System.Drawing.Point

    Location of specified screen point into its client co-ordinates.

    PointToRangeInfo(Point)

    Calculates the cell that is displayed at a specific point.

    Declaration
    public GridRangeInfo PointToRangeInfo(Point point)
    Parameters
    Type Name Description
    System.Drawing.Point point

    The System.Drawing.Point in client coordinates.

    Returns
    Type Description
    GridRangeInfo

    A GridRangeInfo with the cell that is displayed at the point. If no cell is found, Empty is returned.

    Remarks

    The System.Drawing.Point is given in client coordinates.

    Points that fall below the last visible row or column will return the index of the last visible row or column.

    PointToRangeInfo(Point, Int32)

    Calculates the cell that is displayed at a specific point.

    Declaration
    public GridRangeInfo PointToRangeInfo(Point point, int fixOutOfRange)
    Parameters
    Type Name Description
    System.Drawing.Point point

    The System.Drawing.Point in client coordinates.

    System.Int32 fixOutOfRange

    Defines out of range behavior.

    Returns
    Type Description
    GridRangeInfo

    A GridRangeInfo with the cell that is displayed at the point. If no cell is found, Empty is returned.

    Remarks

    The System.Drawing.Point is given in client coordinates.

    Points that fall below the last visible row or right of the last column will be adjusted as defined in the fixOutOfRange parameter.

    • Use -1 if Empty should be returned.
    • Use 0 if the index of the last visible row or column should be used.
    • Use 1 if the index of the last visible row or column should be used but 1 should be added.

    PointToRowCol(Point, out Int32, out Int32)

    Calculates the row and column index for a cell that is displayed at a specific point.

    Declaration
    public bool PointToRowCol(Point point, out int rowIndex, out int colIndex)
    Parameters
    Type Name Description
    System.Drawing.Point point

    The System.Drawing.Point in client coordinates.

    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    Returns
    Type Description
    System.Boolean

    True if cell is found; False otherwise.

    Remarks

    The System.Drawing.Point is given in client coordinates.

    Points that fall below the last visible row or column will return the index of the last visible row or column.

    PointToRowCol(Point, out Int32, out Int32, Int32)

    Calculates the row and column index for a cell that is displayed at a specific point.

    Declaration
    public bool PointToRowCol(Point point, out int rowIndex, out int colIndex, int fixOutOfRange)
    Parameters
    Type Name Description
    System.Drawing.Point point

    The System.Drawing.Point in client coordinates.

    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Int32 fixOutOfRange

    Defines out of range behavior.

    Returns
    Type Description
    System.Boolean

    True if cell is found; False otherwise.

    Remarks

    The System.Drawing.Point is given in client coordinates.

    Points that below the last visible row or right of the last column will be adjusted as defined in the fixOutOfRange parameter.

    • Use -1 if Empty should be returned.
    • Use 0 if the index of the last visible row or column should be used.
    • Use 1 if the index of the last visible row or column should be used but 1 should be added.

    PointToScreen(Point)

    Returns the result of System.Windows.Forms.Control.PointToScreen of the parent control with window handle (see GetWindow()).

    Declaration
    public Point PointToScreen(Point p)
    Parameters
    Type Name Description
    System.Drawing.Point p

    Client point.

    Returns
    Type Description
    System.Drawing.Point

    Point in screen co-ordinates.

    PreProcessMessage(ref Message)

    Preprocesses keyboard or input messages within the message loop before they are dispatched.

    Declaration
    public override bool PreProcessMessage(ref Message msg)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg

    A System.Windows.Form.Message to process.

    Returns
    Type Description
    System.Boolean

    True if preprocessed.

    ProcessCmdKey(ref Message, Keys)

    Processes a command key.

    Declaration
    protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg

    A System.Windows.Forms.Message, passed by reference, that represents the window message to process.

    System.Windows.Forms.Keys keyData

    One of the System.Windows.Forms.Keys values.

    Returns
    Type
    System.Boolean

    ProcessDialogChar(Char)

    Processes a dialog character.

    Declaration
    protected override bool ProcessDialogChar(char charCode)
    Parameters
    Type Name Description
    System.Char charCode

    The character to process.

    Returns
    Type Description
    System.Boolean

    true if the character was processed by the control; otherwise, false.

    ProcessDialogKey(Keys)

    Processes the dialog key.

    Declaration
    protected override bool ProcessDialogKey(Keys key)
    Parameters
    Type Name Description
    System.Windows.Forms.Keys key

    The key code.

    Returns
    Type Description
    System.Boolean

    Return boolean value

    ProcessKeyEventArgs(ref Message)

    Processes a key message and generates the appropriate control events.

    Declaration
    protected override bool ProcessKeyEventArgs(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m

    A System.Windows.Forms.Message, passed by reference, that represents the window message to process.

    Returns
    Type Description
    System.Boolean

    true if the message was processed by the control; otherwise, false.

    ProcessKeyMessage(ref Message)

    Processes a keyboard message.

    Declaration
    protected override bool ProcessKeyMessage(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m

    A System.Windows.Forms.Message, passed by reference, that represents the window message to process.

    Returns
    Type Description
    System.Boolean

    true if the message was processed by the control; otherwise, false.

    ProcessKeyPreview(ref Message)

    Previews a keyboard message.

    Declaration
    protected override bool ProcessKeyPreview(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m

    A System.Windows.Forms.Message, passed by reference, that represents the window message to process.

    Returns
    Type Description
    System.Boolean

    true if the message was processed by the control; otherwise, false.

    ProcessScrollCellInView(Int32, Int32, Boolean, GridScrollCurrentCellReason)

    Called to scroll the specified cell into view.

    Declaration
    public virtual bool ProcessScrollCellInView(int rowIndex, int colIndex, bool dontScroll, GridScrollCurrentCellReason reason)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index. 0 if rows should not scroll.

    System.Int32 colIndex

    The column index. 0 if columns should not scroll.

    System.Boolean dontScroll

    Specified if top row index and left col index should be changed without raising scroll events and without updating the screen (calling DoScroll). Used by GridNestedTableControl grids in GridGroupingControl. Normally this should be false for other scenarios.

    GridScrollCurrentCellReason reason

    The reason for scrolling the current cell into view (e.g. KeyPress, GridFocus etc.)

    Returns
    Type Description
    System.Boolean

    True if scrolling the grid was necessary; False if the range was already in the visible area.

    ProcessTabKeyMovingFocus(Boolean)

    Override this method to customize the processing of a tab key to move control focus.

    Declaration
    public virtual bool ProcessTabKeyMovingFocus(bool forward)
    Parameters
    Type Name Description
    System.Boolean forward

    True if the next Control in the Tab Order is to get focus. False if the previous Control should receive focus.

    Returns
    Type Description
    System.Boolean

    True if Tab key has been handled.

    QueryFocusInside()

    Indicates whether this control contains focus.

    Declaration
    public override bool QueryFocusInside()
    Returns
    Type Description
    System.Boolean

    True if it contains the focus.

    Overrides
    ScrollControl.QueryFocusInside()

    RaiseCellButtonClicked(Int32, Int32, Int32, GridCellButton)

    Initiates call to OnCellButtonClicked(GridCellButtonClickedEventArgs).

    Declaration
    public bool RaiseCellButtonClicked(int rowIndex, int colIndex, int index, GridCellButton button)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Int32 index

    The button index.

    GridCellButton button

    The button.

    Returns
    Type Description
    System.Boolean

    True if operation should continue; False if it should be canceled.

    RaiseCellCancelMode(GridCellMouseEventArgs)

    Initiates call to OnCellCancelMode(GridCellMouseEventArgs).

    Declaration
    public void RaiseCellCancelMode(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    RaiseCellClick(Int32, Int32, MouseEventArgs)

    Triggers a call to OnCellClick(GridCellClickEventArgs) and thus raises the CellClick event.

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

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs mouseEventArgs

    An System.Windows.Forms.MouseEventArgs that contains event data.

    Returns
    Type Description
    System.Boolean

    True if operation should continue with default behavior; False if not.

    RaiseCellClick(Int32, Int32, MouseEventArgs, Boolean)

    Triggers a call to OnCellClick(GridCellClickEventArgs) and thus raises the CellClick event.

    Declaration
    public bool RaiseCellClick(int rowIndex, int colIndex, MouseEventArgs mouseEventArgs, bool overImage)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index of the current cell.

    System.Int32 colIndex

    The column index of the current cell.

    System.Windows.Forms.MouseEventArgs mouseEventArgs

    The MouseEventArgs for this event.

    System.Boolean overImage

    Indicates if the mouse was over an image (see ImageIndex) in static cell when the mouse was released.

    Returns
    Type Description
    System.Boolean

    True if operation should continue with default behavior; False if not.

    RaiseCellCursor(GridCellCursorEventArgs)

    Initiates call to OnCellCursor(GridCellCursorEventArgs).

    Declaration
    public void RaiseCellCursor(GridCellCursorEventArgs e)
    Parameters
    Type Name Description
    GridCellCursorEventArgs e

    A GridCellCursorEventArgs that contains the event data.

    RaiseCellDoubleClick(Int32, Int32, MouseEventArgs)

    Triggers a call to OnCellDoubleClick(GridCellClickEventArgs) and thus raises the CellDoubleClick event.

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

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs mouseEventArgs

    The MouseEventArgs for this event.

    Returns
    Type Description
    System.Boolean

    True if operation should continue with default behavior; False if not.

    RaiseCellDoubleClick(Int32, Int32, MouseEventArgs, Boolean)

    Triggers a call to OnCellDoubleClick(GridCellClickEventArgs) and thus raises the CellDoubleClick event.

    Declaration
    public bool RaiseCellDoubleClick(int rowIndex, int colIndex, MouseEventArgs mouseEventArgs, bool overImage)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs mouseEventArgs

    An System.Windows.Forms.MouseEventArgs that contains event data.

    System.Boolean overImage

    Indicates if the mouse was over an image (see ImageIndex) in a static cell when the mouse was released.

    Returns
    Type Description
    System.Boolean

    True if operation should continue with default behavior; False if not.

    RaiseCellHitTest(GridCellHitTestEventArgs)

    Initiates call to OnCellHitTest(GridCellHitTestEventArgs).

    Declaration
    public void RaiseCellHitTest(GridCellHitTestEventArgs e)
    Parameters
    Type Name Description
    GridCellHitTestEventArgs e

    An that contains event data.

    RaiseCellMouseDown(GridCellMouseEventArgs)

    Initiates call to OnCellMouseDown(GridCellMouseEventArgs).

    Declaration
    public void RaiseCellMouseDown(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    RaiseCellMouseHover(GridCellMouseEventArgs)

    Initiates call to OnCellMouseHover(GridCellMouseEventArgs).

    Declaration
    public void RaiseCellMouseHover(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    RaiseCellMouseHoverEnter(GridCellMouseEventArgs)

    Initiates call to OnCellMouseHoverEnter(GridCellMouseEventArgs).

    Declaration
    public void RaiseCellMouseHoverEnter(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    RaiseCellMouseHoverLeave(GridCellMouseEventArgs)

    Initiates call to OnCellMouseHoverLeave(GridCellMouseEventArgs).

    Declaration
    public void RaiseCellMouseHoverLeave(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    RaiseCellMouseMove(GridCellMouseEventArgs)

    Initiates call to OnCellMouseMove(GridCellMouseEventArgs).

    Declaration
    public void RaiseCellMouseMove(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    RaiseCellMouseUp(GridCellMouseEventArgs)

    Initiates call to OnCellMouseUp(GridCellMouseEventArgs).

    Declaration
    public void RaiseCellMouseUp(GridCellMouseEventArgs e)
    Parameters
    Type Name Description
    GridCellMouseEventArgs e

    A GridCellMouseEventArgs that contains the event data.

    RaiseCheckBoxClick(Int32, Int32, MouseEventArgs)

    Triggers a call to OnCheckBoxClick(GridCellClickEventArgs) and thus raises the CheckBoxClick event.

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

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs mouseEventArgs

    An System.Windows.Forms.MouseEventArgs that contains event data.

    Returns
    Type Description
    System.Boolean

    True if operation should continue with default behavior; False if not.

    RaiseCurrentCellCloseDropDown(PopupClosedEventArgs)

    Initiates call to OnCurrentCellCloseDropDown(PopupClosedEventArgs).

    Declaration
    public void RaiseCurrentCellCloseDropDown(PopupClosedEventArgs e)
    Parameters
    Type Name Description
    PopupClosedEventArgs e

    An System.EventArgs that contains the event data.

    RaiseCurrentCellControlKeyMessage(GridCurrentCellControlKeyMessageEventArgs)

    Initiates call to OnCurrentCellControlKeyMessage(GridCurrentCellControlKeyMessageEventArgs).

    Declaration
    public void RaiseCurrentCellControlKeyMessage(GridCurrentCellControlKeyMessageEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellControlKeyMessageEventArgs e

    The event arguments.

    RaiseCurrentCellDeleting()

    Initiates call to OnCurrentCellDeleting(CancelEventArgs).

    Declaration
    public bool RaiseCurrentCellDeleting()
    Returns
    Type Description
    System.Boolean

    True if the call is initiated.

    RaiseCurrentCellErrorMessage(GridCurrentCellErrorMessageEventArgs)

    Initiates call to OnCurrentCellErrorMessage(GridCurrentCellErrorMessageEventArgs).

    Declaration
    public bool RaiseCurrentCellErrorMessage(GridCurrentCellErrorMessageEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellErrorMessageEventArgs e

    The event arguments.

    Returns
    Type Description
    System.Boolean

    True if the method call is initiated.

    RaiseCurrentCellInitializeControlText(GridCurrentCellInitializeControlTextEventArgs)

    Initiates call to OnCurrentCellInitializeControlText(GridCurrentCellInitializeControlTextEventArgs).

    Declaration
    public bool RaiseCurrentCellInitializeControlText(GridCurrentCellInitializeControlTextEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellInitializeControlTextEventArgs e

    The event arguments.

    Returns
    Type Description
    System.Boolean

    True if the method call is initiated.

    RaiseCurrentCellShowedDropDown(EventArgs)

    Initiates call to OnCurrentCellShowedDropDown(EventArgs).

    Declaration
    public void RaiseCurrentCellShowedDropDown(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    RaiseCurrentCellShowingDropDown(GridCurrentCellShowingDropDownEventArgs)

    Initiates call to OnCurrentCellShowingDropDown(GridCurrentCellShowingDropDownEventArgs).

    Declaration
    public void RaiseCurrentCellShowingDropDown(GridCurrentCellShowingDropDownEventArgs e)
    Parameters
    Type Name Description
    GridCurrentCellShowingDropDownEventArgs e

    An System.EventArgs that contains the event data.

    RaiseCurrentCellValidated()

    Initiates call to OnCurrentCellValidated(EventArgs).

    Declaration
    public void RaiseCurrentCellValidated()

    RaiseDrawCellBackground(GridDrawCellBackgroundEventArgs)

    Initiates call to OnDrawCellBackground(GridDrawCellBackgroundEventArgs).

    Declaration
    public void RaiseDrawCellBackground(GridDrawCellBackgroundEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellBackgroundEventArgs e

    The event arguments

    RaiseDrawCellButton(GridDrawCellButtonEventArgs)

    Initiates call to OnDrawCellButton(GridDrawCellButtonEventArgs).

    Declaration
    public void RaiseDrawCellButton(GridDrawCellButtonEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellButtonEventArgs e

    The event arguments.

    RaiseDrawCellButtonBackground(GridDrawCellButtonBackgroundEventArgs)

    Initiates call to OnDrawCellButtonBackground(GridDrawCellButtonBackgroundEventArgs).

    Declaration
    public void RaiseDrawCellButtonBackground(GridDrawCellButtonBackgroundEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellButtonBackgroundEventArgs e

    The event arguments

    RaiseDrawCellDisplayText(GridDrawCellDisplayTextEventArgs)

    Initiates call to OnDrawCellDisplayText(GridDrawCellDisplayTextEventArgs).

    Declaration
    public void RaiseDrawCellDisplayText(GridDrawCellDisplayTextEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellDisplayTextEventArgs e

    The event arguments.

    RaiseDrawCellFrameAppearance(GridDrawCellBackgroundEventArgs)

    Initiates call to OnDrawCellFrameAppearance(GridDrawCellBackgroundEventArgs).

    Declaration
    public void RaiseDrawCellFrameAppearance(GridDrawCellBackgroundEventArgs e)
    Parameters
    Type Name Description
    GridDrawCellBackgroundEventArgs e

    The event arguments

    RaiseDrawCurrentCellBorder(GridDrawCurrentCellBorderEventArgs)

    Initiates call to OnDrawCurrentCellBorder(GridDrawCurrentCellBorderEventArgs).

    Declaration
    public void RaiseDrawCurrentCellBorder(GridDrawCurrentCellBorderEventArgs e)
    Parameters
    Type Name Description
    GridDrawCurrentCellBorderEventArgs e

    The event arguments

    RaiseMouseActivating()

    Initiates call to OnMouseActivating(CancelEventArgs).

    Declaration
    public bool RaiseMouseActivating()
    Returns
    Type Description
    System.Boolean

    True if the method call is initiated.

    RaiseMouseWheel(MouseEventArgs)

    Initiates call to OnMouseWheel(MouseEventArgs).

    Declaration
    public void RaiseMouseWheel(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs that contains the event data.

    RaisePrepareViewStyleInfo(Int32, Int32, GridStyleInfo)

    Raises the PrepareViewStyleInfo event which allows changing view-specific settings for the cells style object before the cell is displayed in the grid (except cell type and base style). These changes will not be cached and saved in the grid.

    Declaration
    public void RaisePrepareViewStyleInfo(int rowIndex, int colIndex, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    System.Int32 colIndex

    The column index.

    GridStyleInfo style

    The GridStyleInfo object that holds cell information.

    RaisePushButtonClick(Int32, Int32)

    Triggers a call to OnPushButtonClick(GridCellPushButtonClickEventArgs) and thus raises the PushButtonClick event.

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

    The row index of the current cell.

    System.Int32 colIndex

    The column index of the current cell.

    RaiseQueryCanOleDragRange(GridQueryCanOleDragRangeEventArgs)

    Initiates call to OnQueryCanOleDragRange(GridQueryCanOleDragRangeEventArgs).

    Declaration
    public void RaiseQueryCanOleDragRange(GridQueryCanOleDragRangeEventArgs e)
    Parameters
    Type Name Description
    GridQueryCanOleDragRangeEventArgs e

    An GridQueryCanOleDragRangeEventArgsthat contains event data.

    RaiseResizingColumns(GridResizingColumnsEventArgs)

    Initiates call to OnResizingColumns(GridResizingColumnsEventArgs).

    Declaration
    public void RaiseResizingColumns(GridResizingColumnsEventArgs e)
    Parameters
    Type Name Description
    GridResizingColumnsEventArgs e

    An GridResizingColumnsEventArgsthat contains event data.

    RaiseResizingRows(GridResizingRowsEventArgs)

    Initiates call to OnResizingRows(GridResizingRowsEventArgs).

    Declaration
    public void RaiseResizingRows(GridResizingRowsEventArgs e)
    Parameters
    Type Name Description
    GridResizingRowsEventArgs e

    An GridResizingRowsEventArgsthat contains event data.

    RaiseSelectionDragged(GridSelectionDragEventArgs)

    Initiates call to OnSelectionDragged(GridSelectionDragEventArgs).

    Declaration
    public void RaiseSelectionDragged(GridSelectionDragEventArgs e)
    Parameters
    Type Name Description
    GridSelectionDragEventArgs e

    An GridSelectionDragEventArgs that contain the event data.

    RaiseSelectionDragging(GridSelectionDragEventArgs)

    Initiates call to OnSelectionDragging(GridSelectionDragEventArgs).

    Declaration
    public void RaiseSelectionDragging(GridSelectionDragEventArgs e)
    Parameters
    Type Name Description
    GridSelectionDragEventArgs e

    An GridSelectionDragEventArgs that contain the event data.

    RaiseWrapCellNextControlInForm(GridWrapCellNextControlInFormEventArgs)

    Initiates call to OnWrapCellNextControlInForm(GridWrapCellNextControlInFormEventArgs).

    Declaration
    public void RaiseWrapCellNextControlInForm(GridWrapCellNextControlInFormEventArgs e)
    Parameters
    Type Name Description
    GridWrapCellNextControlInFormEventArgs e

    The event arguments.

    RangeInfoToRectangle(GridRangeInfo)

    Calculates the display area for a given range of cells.

    Declaration
    public Rectangle RangeInfoToRectangle(GridRangeInfo range)
    Parameters
    Type Name Description
    GridRangeInfo range

    The GridRangeInfo with the range of cells.

    Returns
    Type Description
    System.Drawing.Rectangle

    A System.Drawing.Rectangle that spans the range of visible cells. If no cells in the given range are visible, System.Drawing.Rectangle.Empty is returned.

    Remarks

    If there are covered cells or floating cells, they will treated as regular cells. The range is not enlarged to fit these spanned cells.

    RangeInfoToRectangle(GridRangeInfo, GridRangeOptions)

    Calculates the display area for a given range of cells.

    Declaration
    public Rectangle RangeInfoToRectangle(GridRangeInfo range, GridRangeOptions options)
    Parameters
    Type Name Description
    GridRangeInfo range

    The GridRangeInfo with the range of cells.

    GridRangeOptions options

    A GridRangeOptions value specifies how to handle spanned cells and also how to handle ranges that are outside the current visible area.

    Returns
    Type Description
    System.Drawing.Rectangle

    A System.Drawing.Rectangle spans the range of visible cells. If no cells in the given range are visible, System.Drawing.Rectangle.Empty is returned.

    Remarks

    If there are covered cells or floating cells, they will be treated as specified with the "options" parameter:

    ItemsDescriptions
    None Use range as specified.
    MergeCoveredCells Enlarge range with any covered cells that intersect with the original range.
    MergeFloatedCells Enlarge range with any floating cells that intersect with the original range.
    MergeMergedCells Enlarge range with any merged cells that intersect with the original range.
    MergeAllSpannedCells Enlarge range with any merged cells (not implemented, reserved for future use) that intersect with the original range.
    CalculateNonClientArea Included are outside of the current visible grid view. Otherwise RangeInfoToRectangle(GridRangeInfo) will ignore cells that are not visible.

    RectangleToClient(Rectangle)

    Returns the result of System.Windows.Forms.Control.RectangleToClient of the parent control with window handle (see GetWindow()).

    Declaration
    public Rectangle RectangleToClient(Rectangle p)
    Parameters
    Type Name Description
    System.Drawing.Rectangle p

    Rectangle to convert.

    Returns
    Type Description
    System.Drawing.Rectangle

    Rectangle in client co-ordinates.

    RectangleToRangeInfo(Rectangle)

    Calculates a range of cells that is displayed at the specified area.

    Declaration
    public GridRangeInfo RectangleToRangeInfo(Rectangle rect)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rect

    A System.Drawing.Rectangle that specifies the area.

    Returns
    Type Description
    GridRangeInfo

    A GridRangeInfo with cells that are displayed at the given area. If no cells are found, Empty is returned.

    Remarks

    The System.Drawing.Rectangle is given in client coordinates.

    Points that fall below the last visible row or column will return the index of the last visible row or column.

    RectangleToRangeInfo(Rectangle, Int32)

    Calculates a range of cells that is displayed at the specified area.

    Declaration
    public GridRangeInfo RectangleToRangeInfo(Rectangle rect, int fixOutOfRange)
    Parameters
    Type Name Description
    System.Drawing.Rectangle rect

    A System.Drawing.Rectangle that specifies the area.

    System.Int32 fixOutOfRange

    Defines out of range behavior.

    Returns
    Type Description
    GridRangeInfo

    A GridRangeInfo with cells that are displayed at the given area. If no cells are found, Empty is returned.

    Remarks

    The System.Drawing.Rectangle is given in client coordinates.

    Points that fall below the last visible row or right of the last column will be adjusted as defined in the fixOutOfRange parameter.

    • Use -1 if Empty should be returned.
    • Use 0 if the index of the last visible row or column should be used.
    • Use 1 if the index of the last visible row or column should be used but 1 should be added.

    RectangleToScreen(Rectangle)

    Returns the result of System.Windows.Forms.Control.RectangleToScreen of the parent control with window handle (see GetWindow()).

    Declaration
    public Rectangle RectangleToScreen(Rectangle p)
    Parameters
    Type Name Description
    System.Drawing.Rectangle p

    Rectangle to convert.

    Returns
    Type Description
    System.Drawing.Rectangle

    Rectangle in screen co-ordinates.

    Refresh()

    Forces the control to invalidate its client area and immediately redraw itself and any child controls.

    Declaration
    public override sealed void Refresh()

    Refresh(Boolean)

    Declaration
    protected virtual void Refresh(bool fromModel)
    Parameters
    Type Name Description
    System.Boolean fromModel

    True if the grid model needs to be refreshed.

    RefreshRange(GridRangeInfo)

    Invalidates the region of the grid control specified with a range of cells and immediately causes a paint message to be sent to the control before the function returns.

    Declaration
    public void RefreshRange(GridRangeInfo range)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range that defines the region to be invalidated.

    RefreshRange(GridRangeInfo, GridRangeOptions)

    Invalidates the region of the grid control specified with a range of cells and immediately causes a paint message to be sent to the control before the function returns.

    Declaration
    public void RefreshRange(GridRangeInfo range, GridRangeOptions options)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range that defines the region to be invalidated.

    GridRangeOptions options

    Options that indicate if method should enlarge the affected range of cells to include covered and floating cells.

    RefreshRange(GridRangeInfo, GridRangeOptions, Boolean)

    Invalidates the region of the grid control specified with a range of cells and immediately causes a paint message to be sent to the control before the function returns.

    Declaration
    public void RefreshRange(GridRangeInfo range, GridRangeOptions options, bool forceRefreshCurrentCell)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range that defines the region to be invalidated.

    GridRangeOptions options

    Options that indicate if method should enlarge the affected range of cells to include covered and floating cells.

    System.Boolean forceRefreshCurrentCell

    When a current cell is active and within the given range of cells, this option specifies if the current cell should be reinitialized with the underlying cell's value.

    RefreshRange(GridRangeInfo, Boolean)

    Invalidates the region of the grid control specified with a range of cells and immediately causes a paint message to be sent to the control before the function returns.

    Declaration
    public void RefreshRange(GridRangeInfo range, bool forceRefreshCurrentCell)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range that defines the region to be invalidated.

    System.Boolean forceRefreshCurrentCell

    When a current cell is active and within the given range of cells, this option specifies if the current cell should be reinitialized with the underlying cell's value.

    ResetBackgroundImageID()

    Resets BackgroundImageID state.

    Declaration
    public void ResetBackgroundImageID()

    ResetCursor()

    Resets the property to default value.

    Declaration
    public override void ResetCursor()

    ResetGridBounds()

    Resets the GridBounds property.

    Declaration
    public void ResetGridBounds()

    ResetMouseControllers()

    Resets all mouse controllers and removes them from the MouseControllerDispatcher.

    Declaration
    protected virtual void ResetMouseControllers()

    ResetSortIconPlacement()

    Resets the property to default value.

    Declaration
    public void ResetSortIconPlacement()

    ResetWindowlessBounds()

    Switches the grid back into a normal operation mode after a SetWindowlessBounds(Control, Rectangle, Boolean) call.

    Declaration
    public void ResetWindowlessBounds()

    RestoreBoundsAfterPrint()

    Method used internally by nested table control to restore GridBounds after printing.

    Declaration
    public void RestoreBoundsAfterPrint()

    ResumeInvalidate()

    Resumes normal operation for Invalidate() calls.

    Declaration
    public void ResumeInvalidate()

    RowIndexToVScrollPixelPos(Int32)

    Returns the absolute vertical pixel scroll position for a specific row.

    Declaration
    public virtual int RowIndexToVScrollPixelPos(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The row index.

    Returns
    Type Description
    System.Int32

    The absolute vertical pixel scroll position of the row.

    ScrollCellInView(GridRangeInfo)

    Scrolls the specified range into view.

    Declaration
    public bool ScrollCellInView(GridRangeInfo range)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range that should be scrolled into the visible grid view area.

    Returns
    Type Description
    System.Boolean

    True if scrolling the grid was necessary; False if the range was already in the visible area.

    ScrollCellInView(GridRangeInfo, GridScrollCurrentCellReason)

    Scrolls the specified range into view.

    Declaration
    public bool ScrollCellInView(GridRangeInfo range, GridScrollCurrentCellReason reason)
    Parameters
    Type Name Description
    GridRangeInfo range

    The range that should be scrolled into the visible grid view area.

    GridScrollCurrentCellReason reason

    The reason for scrolling the current cell into view (e.g. KeyPress, GridFocus etc.)

    Returns
    Type Description
    System.Boolean

    True if scrolling the grid was necessary; False if the range was already in the visible area.

    ScrollCellInView(Int32, Int32)

    Scrolls the specified cell into view.

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

    The row index. 0 if rows should not scroll.

    System.Int32 colIndex

    The column index. 0 if columns should not scroll.

    Returns
    Type Description
    System.Boolean

    True if scrolling the grid was necessary; False if the range was already in the visible area.

    ScrollCellInView(Int32, Int32, GridScrollCurrentCellReason)

    Scrolls the specified cell into view.

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

    The row index. 0 if rows should not scroll.

    System.Int32 colIndex

    The column index. 0 if columns should not scroll.

    GridScrollCurrentCellReason reason

    The reason for scrolling the current cell into view (e.g. KeyPress, GridFocus etc.)

    Returns
    Type Description
    System.Boolean

    True if scrolling the grid was necessary; False if the range was already in the visible area.

    ScrollWindow(Int32, Int32, Rectangle, Rectangle, Boolean)

    Scrolls the contents of the control.

    Declaration
    public override Rectangle ScrollWindow(int xAmount, int yAmount, Rectangle rect, Rectangle clipRect, bool allowUpdate)
    Parameters
    Type Name Description
    System.Int32 xAmount

    Horizontal scroll offset in pixels..

    System.Int32 yAmount

    Vertical scroll offset in pixels.

    System.Drawing.Rectangle rect

    Scroll bounds.

    System.Drawing.Rectangle clipRect

    Clipping rectangle.

    System.Boolean allowUpdate

    If true, redraws the invalidated regions within its client area.

    Returns
    Type Description
    System.Drawing.Rectangle

    Resultant rectangle that was scrolled into view.

    Overrides
    ScrollControl.ScrollWindow(Int32, Int32, Rectangle, Rectangle, Boolean)

    SetColHidden(Int32, Int32, Boolean)

    Sets values indicating if columns should be hidden.

    Declaration
    public void SetColHidden(int from, int last, bool value)
    Parameters
    Type Name Description
    System.Int32 from

    First column index in range.

    System.Int32 last

    Last column index in range.

    System.Boolean value

    The value to be applied.

    Remarks

    This method calls the GridModelHideRowColsIndexer of a HideCols object in the GridModel.

    SetColHidden(Int32, Int32, Boolean[])

    Sets values indicating if columns should be hidden.

    Declaration
    public void SetColHidden(int from, int last, bool[] values)
    Parameters
    Type Name Description
    System.Int32 from

    First column index in range.

    System.Int32 last

    Last column index in range.

    System.Boolean[] values

    An array with values to be applied.

    SetColumnWidths()

    Set the column width when AllowProportionalColumnSizing is enable

    Declaration
    public void SetColumnWidths()

    SetColWidth(Int32, Int32, Int32)

    Sets the column width for a range of columns.

    Declaration
    public void SetColWidth(int from, int last, int value)
    Parameters
    Type Name Description
    System.Int32 from

    First column index in range.

    System.Int32 last

    Last column index in range.

    System.Int32 value

    The value to be applied.

    Remarks

    This method calls the SetRange(Int32, Int32, Int32) of a HideRows object in the GridModel.

    SetColWidth(Int32, Int32, Int32[])

    Sets the column widths for a range of columns.

    Declaration
    public void SetColWidth(int from, int last, int[] values)
    Parameters
    Type Name Description
    System.Int32 from

    First column index in range.

    System.Int32 last

    Last column index in range.

    System.Int32[] values

    The values to be applied.

    SetCurrentHScrollPixelPos(Int32)

    Sets the current scroll position for pixel scrolling and scrolls the grid

    Declaration
    public void SetCurrentHScrollPixelPos(int pixelPos)
    Parameters
    Type Name Description
    System.Int32 pixelPos

    The new horizontal pixel scroll position.

    SetCurrentVScrollPixelPos(Int32)

    Sets the current absolute vertical pixel scroll position raising events and scrolling the display.

    Declaration
    public void SetCurrentVScrollPixelPos(int pixelPos)
    Parameters
    Type Name Description
    System.Int32 pixelPos

    The new vertical pixel scroll position.

    SetLeftCol(Int32)

    Changes the left column index and scrolls the grid.

    Declaration
    public virtual void SetLeftCol(int colIndex)
    Parameters
    Type Name Description
    System.Int32 colIndex

    The new left column index.

    SetRowHeight(Int32, Int32, Int32)

    Sets the row height a range of rows.

    Declaration
    public void SetRowHeight(int from, int last, int value)
    Parameters
    Type Name Description
    System.Int32 from

    First row index in range.

    System.Int32 last

    Last row index in range.

    System.Int32 value

    The value to be applied.

    Remarks

    This method calls the SetRange(Int32, Int32, Int32) of a RowHeights object in the GridModel.

    SetRowHeight(Int32, Int32, Int32[])

    Sets the row height a range of rows.

    Declaration
    public void SetRowHeight(int from, int last, int[] values)
    Parameters
    Type Name Description
    System.Int32 from

    First row index in range.

    System.Int32 last

    Last row index in range.

    System.Int32[] values

    The values to be applied.

    SetRowHidden(Int32, Int32, Boolean)

    Sets values indicating if rows should be hidden.

    Declaration
    public void SetRowHidden(int from, int last, bool value)
    Parameters
    Type Name Description
    System.Int32 from

    First row index in range.

    System.Int32 last

    Last row index in range.

    System.Boolean value

    The value to be applied.

    Remarks

    This method calls the SetRange(Int32, Int32, Int32) of a HideRows object in the GridModel.

    SetRowHidden(Int32, Int32, Boolean[])

    Sets values indicating if rows should be hidden.

    Declaration
    public void SetRowHidden(int from, int last, bool[] values)
    Parameters
    Type Name Description
    System.Int32 from

    First row index in range.

    System.Int32 last

    Last row index in range.

    System.Boolean[] values

    An array with values to be applied.

    SetTopRow(Int32)

    Changes the top row index and scrolls the grid.

    Declaration
    public virtual void SetTopRow(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The new top row index.

    SetWindowlessBounds(Control, Rectangle, Boolean)

    Switches the grid into a special mode in which you can call its DrawGrid(Graphics) method to draw its contents at a different screen location and with different size than the current visible grid. You must call ResetWindowlessBounds() to switch the grid back to normal operational mode.

    Declaration
    public void SetWindowlessBounds(Control renderControl, Rectangle bounds, bool drawCurrentCell)
    Parameters
    Type Name Description
    System.Windows.Forms.Control renderControl

    The parent control with a window handle.

    System.Drawing.Rectangle bounds

    The new location and bounds of the grid.

    System.Boolean drawCurrentCell

    True if current cell should be outlined in a subsequent DrawGrid call; False if it should not be drawn.

    SetWindowStyle(ControlStyles, Boolean)

    Lets you change System.Windows.Forms.Control.SetStyle(System.Windows.Forms.ControlStyles,System.Boolean).

    Declaration
    public void SetWindowStyle(ControlStyles style, bool value)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlStyles style

    The window style.

    System.Boolean value

    The new value.

    SetWmGetDlgCodeValue(Int32)

    Enables support for MFC and ActiveX Containers and lets you specify the return value when the grid or any of its child controls receive a WM_GETDLGCODE message. When using the grid in MFC applications or in an ActiveX host this value lets you change the default behavior of Tab and Arrows keys. In this scenarios it is recommended to set the value to be DLGC_WANTALLKEYS (= 4). Set this value to -1 if the WM_GETDLGCODE message should not be handled. -1 is the default setting for this property.

    Declaration
    public void SetWmGetDlgCodeValue(int value)
    Parameters
    Type Name Description
    System.Int32 value

    The specified return value when the grid receives a WM_GETDLGCODE message.

    ShouldActivateCurrentCell()

    Shoulds the activate current cell.

    Declaration
    protected virtual bool ShouldActivateCurrentCell()
    Returns
    Type Description
    System.Boolean

    returns boolean value

    ShouldActivateCurrentCellInEnter()

    Shoulds the activate current cell in enter.

    Declaration
    protected virtual bool ShouldActivateCurrentCellInEnter()
    Returns
    Type Description
    System.Boolean

    returns boolean value to indicate Should ActivateCurrentCell InEnter

    ShouldDeactivateCurrentCell()

    Shoulds the deactivate current cell.

    Declaration
    protected virtual bool ShouldDeactivateCurrentCell()
    Returns
    Type Description
    System.Boolean

    returns boolean value

    ShouldDeleteKeyClearCurrentCellContentsOnly()

    When the user presses Delete the current cell renderer checks this method whether it should handle the Delete key or if Delete key should get passed onto grid. Method returns true if CurrentCell Renderer should handle Delete key, optionally raising a CurrentCellDeleting event. It returns false if grid should handle the key, possibly raising a ClearingCells event

    Declaration
    public virtual bool ShouldDeleteKeyClearCurrentCellContentsOnly()
    Returns
    Type Description
    System.Boolean

    True if CurrentCell Renderer should handle Delete key, optionally raising a CurrentCellDeleting event; false if grid should handle the key, possibly raising a ClearingCells event.

    ShouldDisplayHeaderCol()

    Checks if column header should be displayed (based on splitter pane row / column).

    Declaration
    public bool ShouldDisplayHeaderCol()
    Returns
    Type Description
    System.Boolean

    True if the column header should be displayed.

    ShouldDisplayHeaderRow()

    Checks if row header should be displayed (based on splitter pane row / column).

    Declaration
    public bool ShouldDisplayHeaderRow()
    Returns
    Type Description
    System.Boolean

    True if the row header should be displayed.

    ShouldIgnoreInvalidate()

    Determines if calls to Invalidate() should have any effect. If true any calls to Invalidate will immediately return.

    Declaration
    public bool ShouldIgnoreInvalidate()
    Returns
    Type Description
    System.Boolean

    True if Invalidate() should not have any effect.

    ShouldSerializeHScrollBehavior()

    Used internally.

    Declaration
    public bool ShouldSerializeHScrollBehavior()
    Returns
    Type Description
    System.Boolean

    Returns Boolean value to indicate Serialize HScroll Behavior.

    ShouldSerializeSortIconPlacement()

    Determines if property is modified.

    Declaration
    public bool ShouldSerializeSortIconPlacement()
    Returns
    Type Description
    System.Boolean

    Returns Boolean value to indicate serialize SortIconPlacement.

    ShouldSerializeVScrollBehavior()

    Used internally.

    Declaration
    public bool ShouldSerializeVScrollBehavior()
    Returns
    Type Description
    System.Boolean

    Returns Boolean value to indicate Serialize VScroll Behavior

    SuspendInvalidate()

    Prevents any subsequent calls to Invalidate() to have any effect.

    Declaration
    public void SuspendInvalidate()

    ToString()

    Returns a string holding the current object details.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    String representation of the current object.

    UnwireModel()

    Releases listeners for the GridModel.

    Declaration
    protected virtual void UnwireModel()

    Update()

    Causes the control to redraw the invalidated regions within its client area.

    Declaration
    public virtual void Update()

    UpdateScrollBars()

    Updates scrollbars with current scroll position and scroll range. Hides or enables scrollbars as specified with HScrollBehavior and VScrollBehavior.

    Declaration
    public override void UpdateScrollBars()
    Overrides
    ScrollControl.UpdateScrollBars()
    Remarks

    UpdateScrollBars() might also scroll your grid if AutoScroll has been specified for the HScrollBehavior or VScrollBehavior.

    UpdateScrollTips(ScrollEventArgs)

    Declaration
    protected override void UpdateScrollTips(ScrollEventArgs se)
    Parameters
    Type Name Description
    System.Windows.Forms.ScrollEventArgs se
    Overrides
    ScrollControl.UpdateScrollTips(ScrollEventArgs)

    UpdateWithCustomPaint(Rectangle, PaintEventHandler)

    Allows you to perform a quick Invalidate / Update pair on the grid without executing any of the grids default paint code. Instead you can provide your own routine to update invalidated areas in the grid.

    Declaration
    public void UpdateWithCustomPaint(Rectangle r, PaintEventHandler customPaintDelegate)
    Parameters
    Type Name Description
    System.Drawing.Rectangle r

    The Rectangle

    System.Windows.Forms.PaintEventHandler customPaintDelegate

    The customPaintDelegate

    Examples

    The following example lets you draw a small portion of the grid bypassing the grids paint handler (and it trying to recalculating layout cells and other precautions it takes when handling the Paint method).

    When compared to calling DrawClippedGrid this approach is a bit slower but it avoids flickering since it can take advantage of the WinForms own double-buffering mechanism.

    In OnPaint the grid checks InUpdateWithCustomPaint and if it is true then the grids Paint method will only call the delegate and immediately return.

    gridTableControl.UpdateWithCustomPaint(bounds, new PaintEventHandler(TableControl_CustomPaint));
    void TableControl_CustomPaint(object sender, PaintEventArgs e)
    {
        Rectangle clipBounds = Rectangle.Truncate(e.Graphics.ClipBounds);
        gridTableControl.DrawClippedGrid(e.Graphics, clipBounds, false);
    }

    UpdateWithDrawClippedGrid(Rectangle)

    Allows you to perform a quick Invalidate / Update pair on the grid without executing any of the grids default paint code. Instead the grid will only call DrawClippedGrid from its Paint handler and immediately return.

    When compared to calling DrawClippedGrid using a cached graphics context this method is a bit slower but it avoids flickering since it can take advantage of the WinForms own double-buffering mechanism.

    Declaration
    public void UpdateWithDrawClippedGrid(Rectangle clipBounds)
    Parameters
    Type Name Description
    System.Drawing.Rectangle clipBounds

    Clipping rectangle.

    VScrollPixelPosToRowIndex(Int32, out Int32, out Int32)

    Determines the row index that is located at a specified vertical pixel scroll position.

    Declaration
    public virtual void VScrollPixelPosToRowIndex(int pixelPos, out int rowIndex, out int pixelDelta)
    Parameters
    Type Name Description
    System.Int32 pixelPos

    The absolute vertical pixel scroll position.

    System.Int32 rowIndex

    Returns the resulting rowIndex.

    System.Int32 pixelDelta

    Returns the number of pixels the top most row is above the view area for the pixelPos scroll position.

    VScrollPixelScrollInView(Rectangle)

    Scrolls the specified rectangle into view.

    Declaration
    public virtual bool VScrollPixelScrollInView(Rectangle r)
    Parameters
    Type Name Description
    System.Drawing.Rectangle r

    The coordinates to be scrolled into view. The rectangle coordinates are client coordinates of the window. The rectangle coordinates can be negative if the coordinates are above the current viewing area.

    Returns
    Type Description
    System.Boolean

    True if grid was scrolled; False if rectangle bounds were already inside visible area.

    WireModel()

    Sets up listeners for the GridModel and initializes mouse controllers and data object consumers.

    Declaration
    protected virtual void WireModel()

    WndProc(ref Message)

    Processes Windows messages and optionally routes them to the control.

    Declaration
    protected override void WndProc(ref Message msg)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg

    The System.Windows.Forms.Message instance to process.

    Overrides
    ScrollControl.WndProc(ref Message)

    Events

    CellButtonClicked

    Occurs when the user has clicked on a child button element inside a cell renderer.

    Declaration
    public event GridCellButtonClickedEventHandler CellButtonClicked
    Event Type
    Type
    GridCellButtonClickedEventHandler

    CellCancelMode

    Occurs before the OnCancelMode(Int32, Int32) method of a cell's GridCellRendererBase is called.

    Declaration
    public event GridCellMouseEventHandler CellCancelMode
    Event Type
    Type
    GridCellMouseEventHandler
    Remarks

    Event is raised only when the cell's HitTest method indicated previously with a non-zero hit-test value that it wants the mouse operation.

    CellClick

    The user clicks inside a cell.

    Declaration
    public event GridCellClickEventHandler CellClick
    Event Type
    Type
    GridCellClickEventHandler

    CellCursor

    Grid queries for the cursor to display for a specific cell when the cell indicated previously with a non-zero hit-test value that it wants the mouse operation.

    Declaration
    public event GridCellCursorEventHandler CellCursor
    Event Type
    Type
    GridCellCursorEventHandler

    CellDoubleClick

    The user double-clicks inside a cell.

    Declaration
    public event GridCellClickEventHandler CellDoubleClick
    Event Type
    Type
    GridCellClickEventHandler

    CellDrawn

    Occurs for every cell after the grid has drawn the specified cell.

    Declaration
    public event GridDrawCellEventHandler CellDrawn
    Event Type
    Type
    GridDrawCellEventHandler
    Remarks

    See GridDrawCellEventArgs for more detailed discussion.

    See Also
    OnDrawItem(Graphics, Int32, Int32, Rectangle, GridStyleInfo)
    OnDraw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)
    Draw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)

    CellHitTest

    Grid performs hit-test for a cell.

    Declaration
    public event GridCellHitTestEventHandler CellHitTest
    Event Type
    Type
    GridCellHitTestEventHandler

    CellMouseDown

    Occurs before the OnMouseDown(Int32, Int32, MouseEventArgs) method of a cell's GridCellRendererBase is called.

    Declaration
    public event GridCellMouseEventHandler CellMouseDown
    Event Type
    Type
    GridCellMouseEventHandler
    Remarks

    Event is raised only when the cell's HitTest method indicated previously with a non-zero hit-test value that it wants the mouse operation.

    CellMouseHover

    Occurs before the OnMouseHover(Int32, Int32, MouseEventArgs) method of a cell's GridCellRendererBase is called.

    Declaration
    public event GridCellMouseEventHandler CellMouseHover
    Event Type
    Type
    GridCellMouseEventHandler
    Remarks

    Event is raised both when the cell's HitTest method indicated previously with a non-zero hit-test value that it wants the mouse operation or when the user is hovering the mouse over cells and the "SelectCells" mouse controller is about to handle the mouse operation.

    CellMouseHoverEnter

    Occurs before the OnMouseHoverEnter(Int32, Int32) method of a cell's GridCellRendererBase is called.

    Declaration
    public event GridCellMouseEventHandler CellMouseHoverEnter
    Event Type
    Type
    GridCellMouseEventHandler
    Remarks

    Event is raised both when the cell's HitTest method indicated previously with a non-zero hit-test value that it wants the mouse operation or when the user is hovering the mouse over cells and the "SelectCells" mouse controller is about to handle the mouse operation.

    CellMouseHoverLeave

    Occurs before the OnMouseHoverLeave(Int32, Int32, EventArgs) method of a cell's GridCellRendererBase is called.

    Declaration
    public event GridCellMouseEventHandler CellMouseHoverLeave
    Event Type
    Type
    GridCellMouseEventHandler
    Remarks

    Event is raised both when the cell's HitTest method indicated previously with a non-zero hit-test value that it wants the mouse operation or when the user is hovering the mouse over cells and the "SelectCells" mouse controller is about to handle the mouse operation.

    CellMouseMove

    Occurs before the OnMouseMove(Int32, Int32, MouseEventArgs) method of a cell's GridCellRendererBase is called.

    Declaration
    public event GridCellMouseEventHandler CellMouseMove
    Event Type
    Type
    GridCellMouseEventHandler
    Remarks

    Event is raised only when the cell's HitTest method indicated previously with a non-zero hit-test value that it wants the mouse operation.

    CellMouseUp

    Occurs before the OnMouseUp(Int32, Int32, MouseEventArgs) method of a cell's GridCellRendererBase is called.

    Declaration
    public event GridCellMouseEventHandler CellMouseUp
    Event Type
    Type
    GridCellMouseEventHandler
    Remarks

    Event is raised only when the cell's HitTest method indicated previously with a non-zero hit-test value that it wants the mouse operation.

    CheckBoxClick

    The user clicks inside the checker box of a check box.

    Declaration
    public event GridCellClickEventHandler CheckBoxClick
    Event Type
    Type
    GridCellClickEventHandler

    CommentTipShowing

    Occurs when the comment tip window is going to show.

    Declaration
    public event CommentTipShowingEventHandler CommentTipShowing
    Event Type
    Type
    CommentTipShowingEventHandler

    CommentTipShown

    Occurs after the comment tip window is shown.

    Declaration
    public event CommentTipShownEventHandler CommentTipShown
    Event Type
    Type
    CommentTipShownEventHandler

    CurrentCellAcceptedChanges

    Occurs when the grid accepts changes made to the active current cell.

    Declaration
    public event CancelEventHandler CurrentCellAcceptedChanges
    Event Type
    Type
    System.ComponentModel.CancelEventHandler
    Remarks

    The grid raises this cancelable event when the CurrentCell object's ConfirmChanges() method is called. Deactivate(Boolean) and EndEdit() call this method when the current cell was in editing mode and its contents were modified and validated.

    You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    If you assign true to System.ComponentModel.CancelEventArgs.Cancel, the grid will not deactivate the current cell.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellActivated

    Occurs after the grid activates the specified cell as current cell.

    Declaration
    public event EventHandler CurrentCellActivated
    Event Type
    Type
    System.EventHandler
    Remarks

    You can determine if Activate(Int32, Int32) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See Also
    GridCurrentCellActivatingEventArgs
    Activate(Int32, Int32)
    IsInMoveTo

    CurrentCellActivateFailed

    Occurs after the grid fails to activate a specific cell as current cell.

    Declaration
    public event GridCurrentCellActivateFailedEventHandler CurrentCellActivateFailed
    Event Type
    Type
    GridCurrentCellActivateFailedEventHandler
    Remarks

    You can determine if Activate(Int32, Int32) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    See Also
    GridCurrentCellActivateFailedEventArgs
    Activate(Int32, Int32)
    IsInMoveTo

    CurrentCellActivating

    Occurs before the grid activates the specified cell as current cell.

    Declaration
    public event GridCurrentCellActivatingEventHandler CurrentCellActivating
    Event Type
    Type
    GridCurrentCellActivatingEventHandler
    Remarks

    You can disallow the activation of specific cells at run-time when you assign True to System.ComponentModel.CancelEventArgs.Cancel.

    You can modify the RowIndex and ColIndex to activate a different cell.

    You can determine if Activate(Int32, Int32) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    Once the current cell has been activated, a CurrentCellActivated event is raised or a CurrentCellActivateFailed if activating the specified cell failed.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    See Also
    GridCurrentCellActivatingEventArgs
    Activate(Int32, Int32)
    IsInMoveTo

    CurrentCellChanged

    Occurs when the user changes contents of the current cell.

    Declaration
    public event EventHandler CurrentCellChanged
    Event Type
    Type
    System.EventHandler
    Remarks

    The grid sends this event whenever changes occur, similar to a System.Windows.Forms.TextBoxBase.ModifiedChanged event.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellChanging

    Occurs when the user wants to modify contents of the current cell.

    Declaration
    public event CancelEventHandler CurrentCellChanging
    Event Type
    Type
    System.ComponentModel.CancelEventHandler
    Remarks

    The grid sends this event before the changes are applied to the active cell. You can cancel the operation by setting System.ComponentModel.CancelEventArgs.Cancel to True.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellCloseDropDown

    Occurs when the drop-down part of the current cell was / is closed.

    Declaration
    public event PopupClosedEventHandler CurrentCellCloseDropDown
    Event Type
    Type
    PopupClosedEventHandler

    CurrentCellConfirmChangesFailed

    Occurs when the grid could not save changes made to the active current cell.

    Declaration
    public event EventHandler CurrentCellConfirmChangesFailed
    Event Type
    Type
    System.EventHandler
    Remarks

    The grid raises this event when the CurrentCell object's ConfirmChanges() method is called and its contents were modified and could not be successfully validated or saved back to the data source.

    The Exception and ErrorMessage properties provide details why the operation failed. If you want to display a message box be sure to reset the the error state with ResetError().

    You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellControlDoubleClick

    Occurs when the current cell is in-place editing mode and the user double-clicks inside the control associated with the current cell.

    Declaration
    public event ControlEventHandler CurrentCellControlDoubleClick
    Event Type
    Type
    System.Windows.Forms.ControlEventHandler
    Remarks

    GridCurrentCell.ControlDoubleClick lets you detect a double click inside a cell for any CurrentCellActivateBehavior. If for example the focus is set to the renderer's control after the first click, the grid will listen for a MouseDown on the newly focused control and raise this event on a second click.

    Check the associated Renderer for state of the cell renderer.

    Raising this event is only optional for the cell renderer that manages the active cell.

    A text box will usually send this event when the associated TextBox control has received the focus after the cell is switched into edit mode and the user double-clicks. Other cell renderers may or may not send this event.

    CurrentCellControlGotFocus

    Occurs when the current cell has switched to in-place editing and the control associated with the current cell has received the focus.

    Declaration
    public event ControlEventHandler CurrentCellControlGotFocus
    Event Type
    Type
    System.Windows.Forms.ControlEventHandler
    Remarks

    Check the associated Renderer for state of the cell renderer.

    Raising this event is only optional for the cell renderer that manages the active cell.

    A text box will usually send this event when the associated System.Windows.Forms.TextBox control has received the focus after the cell was switched into edit mode with BeginEdit(). Other cell renderers may or may not send this event.

    CurrentCellControlKeyMessage

    This is called from the current cell control's ProcessKeyMessage method and gives you a chance to modify the default behavior of this method. Be aware that this is a very implementation-specific method and you should only handle this event if KeyDown, KeyUp, CurrentCellKeyDown, or CurrentCellKeyUp events are not good enough.

    Declaration
    public event GridCurrentCellControlKeyMessageEventHandler CurrentCellControlKeyMessage
    Event Type
    Type
    GridCurrentCellControlKeyMessageEventHandler

    CurrentCellControlLostFocus

    Occurs when the current cell is in in-place editing mode and the control associated with the current cell has lost the focus.

    Declaration
    public event ControlEventHandler CurrentCellControlLostFocus
    Event Type
    Type
    System.Windows.Forms.ControlEventHandler
    Remarks

    Check the associated Renderer for state of the cell renderer.

    Raising this event is only optional for the cell renderer that manages the active cell.

    A text box will usually send this event when the associated TextBox control has lost the focus after the cell is switched into edit mode with BeginEdit(). Other cell renderers may or may not send this event.

    CurrentCellDeactivated

    Occurs after the grid deactivates current cell.

    Declaration
    public event GridCurrentCellDeactivatedEventHandler CurrentCellDeactivated
    Event Type
    Type
    GridCurrentCellDeactivatedEventHandler
    Remarks

    The grid raises this event when the CurrentCell object's Deactivate(Boolean) method is called. The event occurs after any CurrentCellRejectedChanges, CurrentCellAcceptedChanges, CurrentCellRejectedChanges, or CurrentCellAcceptedChanges are raised.

    You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellDeactivateFailed

    Occurs after the grid fails to deactivate the current cell.

    Declaration
    public event EventHandler CurrentCellDeactivateFailed
    Event Type
    Type
    System.EventHandler
    Remarks

    The grid raises this event when the CurrentCell object's Deactivate(Boolean) method is called and can not deactivate the current cell. The reason deactivation may fail could be that the cell's contents were invalid or any of the event handlers associated with deactivating the current cell signaled to abort this operation.

    You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellDeactivating

    Occurs before the grid the deactivates the current cell.

    Declaration
    public event CancelEventHandler CurrentCellDeactivating
    Event Type
    Type
    System.ComponentModel.CancelEventHandler
    Remarks

    You can cancel the operation by setting System.ComponentModel.CancelEventArgs.Cancel to True.

    You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    See Also
    Deactivate(Boolean)
    IsInMoveTo

    CurrentCellDeleting

    Occurs when the user presses the Delete key on an active current cell.

    Declaration
    public event CancelEventHandler CurrentCellDeleting
    Event Type
    Type
    System.ComponentModel.CancelEventHandler
    Remarks

    The grid will delete contents of the current cell. You can cancel the operation by setting System.ComponentModel.CancelEventArgs.Cancel to True.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellEditingComplete

    Occurs when the grid completes editing mode for the active current cell.

    Declaration
    public event EventHandler CurrentCellEditingComplete
    Event Type
    Type
    System.EventHandler
    Remarks

    The grid raises this event when the CurrentCell object's EndEdit() or CancelEdit() method is called. The event occurs after CurrentCellRejectedChanges or CurrentCellAcceptedChanges were raised.

    You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellErrorMessage

    The CurrentCellErrorMessage notifies you that the current cell validation failed and a message is displayed. You can cancel the event and display your own custom messagebox.

    Declaration
    public event GridCurrentCellErrorMessageEventHandler CurrentCellErrorMessage
    Event Type
    Type
    GridCurrentCellErrorMessageEventHandler
    Examples
            public Form1()
            {
                InitializeComponent();
                this.gridDataBoundGrid2.CurrentCellErrorMessage += new GridCurrentCellErrorMessageEventHandler(gridDataBoundGrid2_CurrentCellErrorMessage);
                this.sqlDataAdapter1.Fill(this.dataSet11);
            }
            void gridDataBoundGrid2_CurrentCellErrorMessage(object sender, GridCurrentCellErrorMessageEventArgs e)
            {
                MessageBox.Show(e.Owner, e.Text);
                e.Cancel = true;
            }

    CurrentCellInitializeControlText

    The CurrentCellInitializeControlText notifies you that the current cell is initialized with text to be displayed in the associated control, e.g. a text box control.

    Declaration
    public event GridCurrentCellInitializeControlTextEventHandler CurrentCellInitializeControlText
    Event Type
    Type
    GridCurrentCellInitializeControlTextEventHandler
    Examples
            public Form1()
            {
                InitializeComponent();
                this.gridDataBoundGrid2.CurrentCellInitializeControlText += new GridCurrentCellInitializeControlTextEventHandler(gridDataBoundGrid2_CurrentCellInitializeControlText);
                this.sqlDataAdapter1.Fill(this.dataSet11);
            }
            void gridDataBoundGrid2_CurrentCellInitializeControlText(object sender, GridCurrentCellInitializeControlTextEventArgs e)
            {
                if (e.CellValue != null)
                {
                    e.ControlText = e.CellValue.ToString();
                }
            }

    CurrentCellKeyDown

    Occurs before OnKeyDown(KeyEventArgs) is called.

    Declaration
    public event KeyEventHandler CurrentCellKeyDown
    Event Type
    Type
    System.Windows.Forms.KeyEventHandler

    CurrentCellKeyPress

    Occurs before OnKeyPress(KeyPressEventArgs) is called.

    Declaration
    public event KeyPressEventHandler CurrentCellKeyPress
    Event Type
    Type
    System.Windows.Forms.KeyPressEventHandler

    CurrentCellKeyUp

    Occurs before OnKeyUp(KeyEventArgs) is called.

    Declaration
    public event KeyEventHandler CurrentCellKeyUp
    Event Type
    Type
    System.Windows.Forms.KeyEventHandler

    CurrentCellMoved

    Occurs when the current cell has been successfully moved to a new position.

    Declaration
    public event GridCurrentCellMovedEventHandler CurrentCellMoved
    Event Type
    Type
    GridCurrentCellMovedEventHandler
    Remarks

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    See Also
    GridCurrentCellMovedEventArgs
    MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean)

    CurrentCellMoveFailed

    Occurs when the current cell fails to be moved to a new position.

    Declaration
    public event GridCurrentCellMoveFailedEventHandler CurrentCellMoveFailed
    Event Type
    Type
    GridCurrentCellMoveFailedEventHandler
    Remarks

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    ErrorMessage might hold an error message why the operation failed.

    See Also
    GridCurrentCellMoveFailedEventArgs
    MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean)

    CurrentCellMoving

    Occurs when the current cell is about to be moved to a new position.

    Declaration
    public event GridCurrentCellMovingEventHandler CurrentCellMoving
    Event Type
    Type
    GridCurrentCellMovingEventHandler
    Remarks

    You can disallow the activation of specific cells at run-time when you assign True to System.ComponentModel.CancelEventArgs.Cancel.

    You can modify the RowIndex and ColIndex to activate a different cell.

    You can also modify the Options.

    Once the current cell has been moved, a CurrentCellMoved event is raised or a CurrentCellMoveFailed if moving to the specified target cell failed.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    See Also
    GridCurrentCellMovingEventArgs
    MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean)

    CurrentCellRejectedChanges

    Occurs when the grid rejects changes made to the active current cell.

    Declaration
    public event EventHandler CurrentCellRejectedChanges
    Event Type
    Type
    System.EventHandler
    Remarks

    The grid raises this event when the CurrentCell object's RejectChanges() method is called. Deactivate(Boolean) and CancelEdit() call this method when the current cell was in editing mode and its contents were modified.

    You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellShowedDropDown

    Occurs after the drop-down part has been dropped-down and made visible.

    Declaration
    public event EventHandler CurrentCellShowedDropDown
    Event Type
    Type
    System.EventHandler

    CurrentCellShowingDropDown

    Occurs when the drop-down part is about to be shown.

    Declaration
    public event GridCurrentCellShowingDropDownEventHandler CurrentCellShowingDropDown
    Event Type
    Type
    GridCurrentCellShowingDropDownEventHandler
    Remarks

    The event will provide you with a suggested size of the drop-down control. You can change the default size in your event handler by changing the Size property.

    Please note however that some drop-down controls might override the suggested height with their own preferred height. The GridDropDownGridListControlPart and GridComboBoxListBoxPart methods both provide a DropDownRows property that defines the number of visible rows.

    To abort the drop-down operation, you should set System.ComponentModel.CancelEventArgs.Cancel to True.

    If you need to get access to the cell renderer, you can use the Renderer property of the CurrentCell object. The CurrentCell object also holds style information and row and column index. See the cell renderer for properties to access the drop-down container and drop-down part.

    CurrentCellStartEditing

    Occurs before the current cell switches into editing mode.

    Declaration
    public event CancelEventHandler CurrentCellStartEditing
    Event Type
    Type
    System.ComponentModel.CancelEventHandler
    Remarks

    The grid will switch into editing mode when the user presses a key while the cell is not in editing mode or when you call BeginEdit(). You can cancel the operation by setting System.ComponentModel.CancelEventArgs.Cancel to True.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellValidated

    Occurs when the grid has successfully validated the contents of the active current cell.

    Declaration
    public event EventHandler CurrentCellValidated
    Event Type
    Type
    System.EventHandler
    Remarks

    You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    CurrentCellValidateString

    Occurs after the user presses a key in the current cell and before it is accepted. Allows you to limit the keys that are accepted for the current cell while the user is typing text.

    Declaration
    public event GridCurrentCellValidateStringEventHandler CurrentCellValidateString
    Event Type
    Type
    GridCurrentCellValidateStringEventHandler

    CurrentCellValidating

    Occurs when the grid validates contents of the active current cell.

    Declaration
    public event CancelEventHandler CurrentCellValidating
    Event Type
    Type
    System.ComponentModel.CancelEventHandler
    Remarks

    You can mark the contents as invalid by by setting System.ComponentModel.CancelEventArgs.Cancel to True.

    The grid raises this event when the CurrentCell object's Validate() method is called. Deactivate(Boolean) calls this method when the current cell was in editing mode and its contents were modified.

    You can determine if Deactivate(Boolean) was called stand-alone or as result of a MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) call by checking the IsInMoveTo property.

    You can find out about the current cell's position by querying the RowIndex and ColIndex properties of the CurrentCell object in GridControlBase.

    See MoveTo(Int32, Int32, GridSetCurrentCellOptions, Boolean) for a discussion about the order of events that you receive when the current cell is moved.

    DrawCell

    Occurs for every cell before the grid draws the specified cell.

    Declaration
    public event GridDrawCellEventHandler DrawCell
    Event Type
    Type
    GridDrawCellEventHandler
    Remarks

    See GridDrawCellEventArgs for more detailed discussion.

    See Also
    OnDrawItem(Graphics, Int32, Int32, Rectangle, GridStyleInfo)
    OnDraw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)
    Draw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)

    DrawCellBackground

    Occurs for every cell before the grid draws the background of a specified cell.

    Declaration
    public event GridDrawCellBackgroundEventHandler DrawCellBackground
    Event Type
    Type
    GridDrawCellBackgroundEventHandler
    Remarks

    See GridDrawCellBackgroundEventArgs for more detailed discussion.

    See Also
    OnDrawItem(Graphics, Int32, Int32, Rectangle, GridStyleInfo)
    OnDraw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)

    DrawCellButton

    Occurs for every button in every cell before the grid draws a cell button.

    Declaration
    public event GridDrawCellButtonEventHandler DrawCellButton
    Event Type
    Type
    GridDrawCellButtonEventHandler
    Remarks

    See GridDrawCellButtonEventArgs for more detailed discussion. See GridDrawCellButtonBackgroundEventArgs for an example.

    See Also
    OnDrawItem(Graphics, Int32, Int32, Rectangle, GridStyleInfo)
    OnDraw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)

    DrawCellButtonBackground

    Occurs for every button in every cell before the grid draws the background of a cell button.

    Declaration
    public event GridDrawCellButtonBackgroundEventHandler DrawCellButtonBackground
    Event Type
    Type
    GridDrawCellButtonBackgroundEventHandler
    Remarks

    See GridDrawCellButtonBackgroundEventArgs for more detailed discussion and also an example.

    See Also
    OnDrawItem(Graphics, Int32, Int32, Rectangle, GridStyleInfo)
    OnDraw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)

    DrawCellDisplayText

    Occurs for every cell before the grid draws the display text for the specified cell.

    Declaration
    public event GridDrawCellDisplayTextEventHandler DrawCellDisplayText
    Event Type
    Type
    GridDrawCellDisplayTextEventHandler
    Remarks

    See GridDrawCellDisplayTextEventArgs for more detailed discussion.

    See Also
    OnDrawItem(Graphics, Int32, Int32, Rectangle, GridStyleInfo)
    OnDraw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)
    Draw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)

    DrawCellFrameAppearance

    Occurs for every cell before the grid draws the frame (sunken or raised) of a specified cell and after the cell's background was drawn.

    Declaration
    public event GridDrawCellBackgroundEventHandler DrawCellFrameAppearance
    Event Type
    Type
    GridDrawCellBackgroundEventHandler
    Remarks

    Set e.Cancel = True if you want to customize the drawing of the frame and do not want the grid with its default drawing for the cell's frame.

    If you want to draw custom borders around a cell, be sure to reserve space for the extra area occupied by your borders. See BorderMargins.

    See Also
    OnDrawItem(Graphics, Int32, Int32, Rectangle, GridStyleInfo)
    OnDraw(System.Drawing.Graphics, System.Drawing.Rectangle, System.Int32, System.Int32, GridStyleInfo)

    DrawCommentIndicator

    Occurs when comment tip indicator is drawing on the cell.

    Declaration
    public event DrawCommentIndicatorEventHandler DrawCommentIndicator
    Event Type
    Type
    DrawCommentIndicatorEventHandler

    DrawCurrentCellBorder

    Occurs when the grid draws a border around the current cell.

    Declaration
    public event GridDrawCurrentCellBorderEventHandler DrawCurrentCellBorder
    Event Type
    Type
    GridDrawCurrentCellBorderEventHandler

    FillRectangleHook

    Occurs before BrushPaint.FillRectangle is called.

    Declaration
    public event GridFillRectangleHookEventHandler FillRectangleHook
    Event Type
    Type
    GridFillRectangleHookEventHandler

    GridBoundsChanged

    Occurs when the GridBounds property has been changed.

    Declaration
    public event EventHandler GridBoundsChanged
    Event Type
    Type
    System.EventHandler

    GridControlMouseDown

    Occurs before a System.Windows.Form.Control.Control.MouseDown is raised and allows you to cancel the mouse event.

    Declaration
    public event CancelMouseEventHandler GridControlMouseDown
    Event Type
    Type
    CancelMouseEventHandler

    GridControlMouseMove

    Occurs before a System.Windows.Form.Control.MouseMove is raised and allows you to cancel the mouse event.

    Declaration
    public event CancelMouseEventHandler GridControlMouseMove
    Event Type
    Type
    CancelMouseEventHandler

    GridControlMouseUp

    Occurs before a System.Windows.Form.Control.MouseUp is raised and allows you to cancel the mouse event.

    Declaration
    public event CancelMouseEventHandler GridControlMouseUp
    Event Type
    Type
    CancelMouseEventHandler

    HScrollPixelPosChanged

    Occurs after the horizontal pixel scroll position was changed.

    Declaration
    public event GridScrollPositionChangedEventHandler HScrollPixelPosChanged
    Event Type
    Type
    GridScrollPositionChangedEventHandler

    HScrollPixelPosChanging

    Occurs before the horizontal pixel scroll position is changed.

    Declaration
    public event GridScrollPositionChangingEventHandler HScrollPixelPosChanging
    Event Type
    Type
    GridScrollPositionChangingEventHandler

    LeftColChanged

    Occurs after the grid has been scrolled when the left column index is changed.

    Declaration
    public event GridRowColIndexChangedEventHandler LeftColChanged
    Event Type
    Type
    GridRowColIndexChangedEventHandler

    LeftColChanging

    Occurs before the grid is scrolled when the left column index is changed.

    Declaration
    public event GridRowColIndexChangingEventHandler LeftColChanging
    Event Type
    Type
    GridRowColIndexChangingEventHandler

    ModelChanged

    Occurs when the Model reference to GridModel is changed.

    Declaration
    public event EventHandler ModelChanged
    Event Type
    Type
    System.EventHandler

    MouseActivating

    Occurs when the user is in the process of activating the control with a mouse click.

    Declaration
    public event CancelEventHandler MouseActivating
    Event Type
    Type
    System.ComponentModel.CancelEventHandler

    MoveCurrentCellDirection

    Declaration
    public event GridMoveCurrentCellDirectionEventHandler MoveCurrentCellDirection
    Event Type
    Type
    GridMoveCurrentCellDirectionEventHandler

    PrepareViewStyleInfo

    This event is raised to allow custom formatting of a cell by changing its style object just before it is drawn.

    Declaration
    public event GridPrepareViewStyleInfoEventHandler PrepareViewStyleInfo
    Event Type
    Type
    GridPrepareViewStyleInfoEventHandler
    Remarks

    This allows formatting based on the current view state, e.g. current cell context, focused control etc.

    See GridPrepareViewStyleInfoEventArgs for further discussion.

    PrintingModeChanged

    Occurs when the PrintingMode has been changed for the grid object.

    Declaration
    public event EventHandler PrintingModeChanged
    Event Type
    Type
    System.EventHandler

    PushButtonClick

    Occurs when the user clicks a push button.

    Declaration
    public event GridCellPushButtonClickEventHandler PushButtonClick
    Event Type
    Type
    GridCellPushButtonClickEventHandler

    QueryCanOleDragRange

    Occurs when the user hovers the mouse over the edge of a selected range. In your event handler, you can determine if the selected range can serve as OLE Data Source.

    Declaration
    public event GridQueryCanOleDragRangeEventHandler QueryCanOleDragRange
    Event Type
    Type
    GridQueryCanOleDragRangeEventHandler
    Remarks

    You can disallow the specified range to be used as OLE Data Source when you assign true to System.ComponentModel.CancelEventArgs.Cancel.

    See Also
    GridQueryCanOleDragRangeEventArgs
    QueryCanOleDragRange

    QueryCreateCellTextBox

    Occurs before TextBox of a TextBox, OriginalTextBox or derived cell type is created.

    Declaration
    public event GridQueryCreateCellTextBoxEventHandler QueryCreateCellTextBox
    Event Type
    Type
    GridQueryCreateCellTextBoxEventHandler

    QueryNextCurrentCellPosition

    Occurs before the the current cell is moved into a specific direction. Normally, cells that are not marked as enabled with Enabled will be skipped but you can hook into this mechanism by implementing an event handler for QueryNextCurrentCellPosition. You should set Handled to True if you handled this event.

    Declaration
    public event GridQueryNextCurrentCellPositionEventHandler QueryNextCurrentCellPosition
    Event Type
    Type
    GridQueryNextCurrentCellPositionEventHandler
    Remarks

    See the SampleGrid class in the grid pad sample for an example.

    QueryScrollCellInView

    Occurs before a cell is scrolled into view by a ScrollCellInView call. Normally, the current cell is checked if it is inside the visible grid area when certain user events occur such as when a key is pressed or when the grid got focus. The event is called to check whether the specified cell is in view. If the cell is not in view, the grid will scroll the cell into view. You can hook into this mechanism by implementing an event handler for this event.

    Declaration
    public event GridQueryScrollCellInViewEventHandler QueryScrollCellInView
    Event Type
    Type
    GridQueryScrollCellInViewEventHandler

    ResizingColumns

    Occurs when the user is resizing a selected range of columns.

    Declaration
    public event GridResizingColumnsEventHandler ResizingColumns
    Event Type
    Type
    GridResizingColumnsEventHandler
    Remarks

    See GridResizingColumnsEventArgs for further discussion.

    ResizingRows

    Occurs when the user is resizing a selected range of rows.

    Declaration
    public event GridResizingRowsEventHandler ResizingRows
    Event Type
    Type
    GridResizingRowsEventHandler
    Remarks

    See GridResizingRowsEventArgs for further discussion.

    ScrollInfoChanged

    Indicates that scrollbar information such as Minimum or Maximum has changed.

    Declaration
    public event EventHandler ScrollInfoChanged
    Event Type
    Type
    System.EventHandler
    Remarks

    If you want to be updated about changes in the Minimum or Maximum scroll position or page size, you should handle this event.

    SelectionDragged

    Occurs when the user is about to drag or is in the process of dragging a selected range of columns or rows.

    Declaration
    public event GridSelectionDragEventHandler SelectionDragged
    Event Type
    Type
    GridSelectionDragEventHandler
    Remarks

    Raised after marker is drawn to give visual feedback about new position.

    See GridSelectionDragEventArgs for further discussion.

    SelectionDragging

    Occurs when the user is about to drag or is in the process of dragging a selected range of columns or rows.

    Declaration
    public event GridSelectionDragEventHandler SelectionDragging
    Event Type
    Type
    GridSelectionDragEventHandler
    Remarks

    Raised before new marker is drawn.

    See GridSelectionDragEventArgs for further discussion.

    SelectionFrameChanged

    Occurs after the Excel-like selection frame has changed.

    Declaration
    public event GraphicsEventHandler SelectionFrameChanged
    Event Type
    Type
    GraphicsEventHandler
    Remarks

    After internal data were changed. Grid will show selection frame.

    SelectionFrameChanging

    Occurs before the Excel-like selection frame is changing.

    Declaration
    public event GraphicsEventHandler SelectionFrameChanging
    Event Type
    Type
    GraphicsEventHandler
    Remarks

    Before internal data are changed. Grid will hide selection frame.

    SupportsTransparentBackColorChanged

    Occurs when the SupportsTransparentBackColor has changed.

    Declaration
    public event EventHandler SupportsTransparentBackColorChanged
    Event Type
    Type
    System.EventHandler

    ThemeChanged

    This event will be fired when the ThemesEnabled property is changed.

    Declaration
    public event EventHandler ThemeChanged
    Event Type
    Type
    System.EventHandler

    TopRowChanged

    Occurs after the grid has been scrolled when the top row index is changed.

    Declaration
    public event GridRowColIndexChangedEventHandler TopRowChanged
    Event Type
    Type
    GridRowColIndexChangedEventHandler

    TopRowChanging

    Occurs before the grid is scrolled when the top row index is changed.

    Declaration
    public event GridRowColIndexChangingEventHandler TopRowChanging
    Event Type
    Type
    GridRowColIndexChangingEventHandler

    VScrollPixelPosChanged

    Occurs after the vertical pixel scroll position was changed.

    Declaration
    public event GridScrollPositionChangedEventHandler VScrollPixelPosChanged
    Event Type
    Type
    GridScrollPositionChangedEventHandler

    VScrollPixelPosChanging

    Occurs before the vertical pixel scroll position is changed.

    Declaration
    public event GridScrollPositionChangingEventHandler VScrollPixelPosChanging
    Event Type
    Type
    GridScrollPositionChangingEventHandler

    WrapCellNextControlInForm

    Occurs before the grid is about to be left because the user is at the top-left or bottom-right cell and about to tab out of the grid. This event is only raised if the NextControlInForm has been specified for WrapCell.

    Declaration
    public event GridWrapCellNextControlInFormEventHandler WrapCellNextControlInForm
    Event Type
    Type
    GridWrapCellNextControlInFormEventHandler
    Remarks

    GridWrapCellNextControlInFormEventHandler

    Explicit Interface Implementations

    IGridModelSource.Model

    Gets a reference to a GridModel.

    Declaration
    GridModel IGridModelSource.Model { get; }
    Returns
    Type
    GridModel

    Implements

    System.IDisposable
    ICancelModeProvider
    ISplitterPaneSupport
    IScrollBarWrapperContainer
    ISupportUpdating
    ISupportIntelliMouse
    IQueryFocusInside
    INonClientPaintingSupport
    IThemedControl
    ICreateNewWindow
    IGridModelSource
    IGridWindowlessSite
    IGridWindowlessObject
    IFindParentForm
    IThemeProvider
    IVisualStyle
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved