menu

WinForms

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

    Show / Hide Table of Contents

    Class GridPushButtonCellRenderer

    Implements the renderer part of a push button cell.

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

    The push button cell is XP Themes enabled. It will be drawn themed if ThemesEnabled is true.

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

    The following table lists some characteristics about the PushButton cell type.

    ItemDescription
    CellTypePushButton
    RendererGridPushButtonCellRenderer
    ModelGridPushButtonCellModel
    XP Themes SupportYes
    Cell ButtonGridCellButton
    InteractiveClick Only
    Floating SupportNo
    Base TypeGridCellRendererBase

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

    PropertyNameDescription
    BaseStyle (System.String)The base style for this style instance with default values for properties that are not initialized for this style object. (Default: String.Empty)
    Borders (GridBordersInfo)Top, left, bottom, and right border settings. (Default: GridBordersInfo.Default)
    CellAppearance (GridCellAppearance)Specifies if cell edges shall be drawn raised, sunken, or flat (default). (Default: GridCellAppearance.Flat)
    CellTipText (System.String)ToolTip text to be displayed when user hovers mouse over cell. (Default: String.Empty)
    CellType (System.String)PushButton. (Default: TextBox)
    Clickable (System.Boolean)Specifies if the button can be clicked with the mouse. See Enabled how to disable activating the cell as current cell. (Default: true)
    Description (System.String)Gets or sets the text that is shown in the button. (Default: String.Empty)
    Enabled (System.Boolean)Specifies if the cell can be activated as current cell or if cell should be skipped when moving the current cell. When disabled, the button will be drawn grayed out. (Default: true)
    Font (GridFontInfo)The font for drawing text. (Default: GridFontInfo.Default)
    HotkeyPrefix (System.Drawing.Text.HotkeyPrefix)Specifies how hot-key prefixes should be displayed. Hot-keys are indicated in text with an '&' (ampersand). When you enable hot-key prefix, the specific characters can be displayed underlined or regular. The '&' will not be displayed. (Default: HotkeyPrefix.Show)
    Interior (BrushInfo)The PushButton usually fills the whole cell area. Therefore the background is only visible if you programatically force the button to be smaller. (Default: SystemColors.Window)
    Themed (System.Boolean)Specifies if cell should be drawn using Windows XP themes when ThemesEnabled has been set. (Default: true)
    Trimming (System.Drawing.StringTrimming)Indicates how text is trimmed when it exceeds the edges of the cell text rectangle. (Default: StringTrimming.Character)
    WrapText (System.Boolean)Specifies if text should be wrapped when it does not fit into a single line. (Default: true)

    Constructors

    GridPushButtonCellRenderer(GridControlBase, GridCellModelBase)

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

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

    The GridControlBase that displays this cell renderer.

    GridCellModelBase cellModel

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

    Remarks

    References to GridControlBase, and GridCellModelBase will be saved.

    GridPushButtonCellRenderer(GridControlBase, GridCellModelBase, GridCellButton)

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

    Declaration
    protected GridPushButtonCellRenderer(GridControlBase grid, GridCellModelBase cellModel, GridCellButton button)
    Parameters
    Type Name Description
    GridControlBase grid

    The GridControlBase that displays this cell renderer.

    GridCellModelBase cellModel

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

    GridCellButton button

    The button to be drawn in the cell.

    Remarks

    References to GridControlBase, and GridCellModelBase will be saved.

    Fields

    pushButton

    Pushbutton fills the whole cell's client area with GridCellButton. This button can be customized.

    Declaration
    protected GridCellButton pushButton
    Field Value
    Type
    GridCellButton

    Methods

    OnButtonClicked(Int32, Int32, Int32)

    Raises the OnButtonClicked(Int32, Int32, Int32)event.

    Declaration
    protected override void OnButtonClicked(int rowIndex, int colIndex, int button)
    Parameters
    Type Name Description
    System.Int32 rowIndex
    System.Int32 colIndex
    System.Int32 button
    Overrides
    GridCellRendererBase.OnButtonClicked(Int32, Int32, Int32)

    OnKeyDown(KeyEventArgs)

    Raises the event when user pressed key down.

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

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

    Overrides
    GridCellRendererBase.OnKeyDown(KeyEventArgs)

    OnKeyUp(KeyEventArgs)

    Raises the event when user released key.

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

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

    Overrides
    GridCellRendererBase.OnKeyUp(KeyEventArgs)

    OnLayout(Int32, Int32, GridStyleInfo, Rectangle, Rectangle[])

    This method is called from PerformLayout to calculate the client rectangle given the inner rectangle of a cell and any boundaries of cell buttons.

    Declaration
    protected override Rectangle OnLayout(int rowIndex, int colIndex, GridStyleInfo style, Rectangle innerBounds, Rectangle[] buttonsBounds)
    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.

    System.Drawing.Rectangle innerBounds

    The System.Drawing.Rectangle with the inner bounds of a cell.

    System.Drawing.Rectangle[] buttonsBounds

    An array of System.Drawing.Rectangle with bounds for each cell button element.

    Returns
    Type Description
    System.Drawing.Rectangle

    A System.Drawing.Rectangle with the bounds.

    Overrides
    GridCellRendererBase.OnLayout(Int32, Int32, GridStyleInfo, Rectangle, Rectangle[])

    OnOutlineCurrentCell(Graphics, Rectangle)

    Declaration
    protected override void OnOutlineCurrentCell(Graphics g, Rectangle r)
    Parameters
    Type Name Description
    System.Drawing.Graphics g
    System.Drawing.Rectangle r
    Overrides
    GridCellRendererBase.OnOutlineCurrentCell(Graphics, Rectangle)

    OnPushButtonClick(Int32, Int32)

    Raises PushButtonClick event when the user presses the PushButton.

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

    Specifies the row id.

    System.Int32 colIndex

    Specifies the column id.

    OnQueryShowButtons(Int32, Int32, GridStyleInfo)

    Determines whether the cell buttons shall be drawn for the specific row and column index.

    Declaration
    protected override bool OnQueryShowButtons(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.

    Returns
    Type Description
    System.Boolean

    Returns Boolean value to indicate the cell buttons shall be drawn for the specific row and column index. Returns true.

    Overrides
    GridCellRendererBase.OnQueryShowButtons(Int32, Int32, GridStyleInfo)

    Implements

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