menu

WinForms

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

    Show / Hide Table of Contents

    Class GridDropDownCellRenderer

    Defines a base class for the renderer parts of cells that support being dropped-down like a combo box.

    Inheritance
    System.Object
    NonFinalizeDisposable
    GridCellRendererBase
    GridStaticCellRenderer
    GridTextBoxCellRenderer
    GridDropDownCellRenderer
    GridComboBoxCellRenderer
    GridDropDownColorUICellRenderer
    GridDropDownGridCellRenderer
    GridDropDownGridListControlCellRenderer
    GridDropDownMonthCalendarCellRenderer
    GridPropertyGridCellRenderer
    Implements
    IQueryFocusInside
    IGridDropDownCell
    IPopupParent
    IPopupItem
    System.IDisposable
    Inherited Members
    GridCellRendererBase.AddButton(GridCellButton)
    GridCellRendererBase.AlwaysRaiseCellClick
    GridCellRendererBase.ChildClosing(IPopupChild, PopupCloseType)
    GridCellRendererBase.ClickOverImage
    GridCellRendererBase.ColIndex
    GridCellRendererBase.Control
    GridCellRendererBase.ControlDoubleClick(Object, EventArgs)
    GridCellRendererBase.ControlMouseDown(Object, MouseEventArgs)
    GridCellRendererBase.ControlText
    GridCellRendererBase.ControlValue
    GridCellRendererBase.CreateDropDownContainer()
    GridCellRendererBase.CurrentCell
    GridCellRendererBase.CurrentStyle
    GridCellRendererBase.Dispose()
    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.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.GetMarkHeaderState(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.GetNestedCurrentCell()
    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.IsReadOnly()
    GridCellRendererBase.IsRelatedControl(Control, Boolean)
    GridCellRendererBase.Model
    GridCellRendererBase.MouseDownPoint
    GridCellRendererBase.MouseDownTick
    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.OnButtonClicked(Int32, Int32, Int32)
    GridCellRendererBase.OnCancelMode(Int32, Int32)
    GridCellRendererBase.OnCellLayoutChanged()
    GridCellRendererBase.OnCloseDropDown(PopupCloseType)
    GridCellRendererBase.OnControlDoubleClick(Control)
    GridCellRendererBase.OnDeactivating()
    GridCellRendererBase.OnDeactived(Int32, Int32)
    GridCellRendererBase.OnDeleting()
    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.OnHitTest(Int32, Int32, MouseEventArgs, IMouseController)
    GridCellRendererBase.OnKeyUp(KeyEventArgs)
    GridCellRendererBase.OnLayout(Int32, Int32, GridStyleInfo, Rectangle, Rectangle[])
    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.OnOutlineCurrentCell(Graphics, Rectangle)
    GridCellRendererBase.OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs)
    GridCellRendererBase.OnQueryShowButtons(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.OnRejectChanges()
    GridCellRendererBase.OnSaveChanges()
    GridCellRendererBase.OnScrollInView(GridScrollCurrentCellReason)
    GridCellRendererBase.OnShowDropDown()
    GridCellRendererBase.OnStartEditing()
    GridCellRendererBase.OnValidate()
    GridCellRendererBase.OnValidated()
    GridCellRendererBase.PerformLayout(Int32, Int32)
    GridCellRendererBase.PerformLayout(Int32, Int32, GridStyleInfo)
    GridCellRendererBase.PerformLayout(Int32, Int32, GridStyleInfo, Rectangle)
    GridCellRendererBase.ProcessKeyEventArgs(Message)
    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.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.ShouldDrawEditing(Int32, Int32)
    GridCellRendererBase.ShouldDrawFocused(Int32, Int32)
    GridCellRendererBase.ShouldRefreshCurrentCell()
    GridCellRendererBase.StyleInfo
    GridCellRendererBase.SupportsEditing
    GridCellRendererBase.SupportsFocusControl
    GridCellRendererBase.ToString()
    GridCellRendererBase.UpdateControlValue()
    GridCellRendererBase.ValidateString(String)
    GridStaticCellRenderer.DrawImage(Graphics, ImageList, Int32, Rectangle)
    GridStaticCellRenderer.DrawImage(Graphics, ImageList, Int32, Rectangle, Boolean)
    GridStaticCellRenderer.DrawImage(Graphics, ImageList, Int32, Rectangle, Rectangle, Boolean)
    GridStaticCellRenderer.DrawRotatedString(Graphics, String, Font, Brush, RectangleF, StringFormat, Single, GridStyleInfo)
    GridStaticCellRenderer.DrawText(Graphics, String, Font, Rectangle, GridStyleInfo, Color)
    GridStaticCellRenderer.DrawText(Graphics, String, Font, Rectangle, GridStyleInfo, Color, Boolean)
    GridStaticCellRenderer.DrawText(Graphics, String, Font, Rectangle, GridStyleInfo, Color, Boolean, Boolean)
    GridStaticCellRenderer.GetRotatedTextBound(String, Font, StringFormat, Single, Single)
    GridStaticCellRenderer.IsPointOverImage(Int32, Int32, Point)
    GridStaticCellRenderer.RemoveMargins(Rectangle, GridStyleInfo)
    GridTextBoxCellRenderer.CanCopy()
    GridTextBoxCellRenderer.CanCut()
    GridTextBoxCellRenderer.CanPaste()
    GridTextBoxCellRenderer.ControlGotFocus(Object, EventArgs)
    GridTextBoxCellRenderer.ControlLostFocus(Object, EventArgs)
    GridTextBoxCellRenderer.Copy()
    GridTextBoxCellRenderer.Cut()
    GridTextBoxCellRenderer.DisableTextBox
    GridTextBoxCellRenderer.Dispose(Boolean)
    GridTextBoxCellRenderer.GetEditState()
    GridTextBoxCellRenderer.GetSelectedText(String)
    GridTextBoxCellRenderer.IgnoreTextBoxChanged
    GridTextBoxCellRenderer.InNotifyCurrentCellChangedException
    GridTextBoxCellRenderer.InSetTextBoxTextCore
    GridTextBoxCellRenderer.InTextBoxChanged
    GridTextBoxCellRenderer.LimitTextLength
    GridTextBoxCellRenderer.ModelUpdateActiveText()
    GridTextBoxCellRenderer.NotifyCurrentCellChanged()
    GridTextBoxCellRenderer.OnClick(Int32, Int32, MouseEventArgs)
    GridTextBoxCellRenderer.OnDoubleClick(Int32, Int32, MouseEventArgs)
    GridTextBoxCellRenderer.OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
    GridTextBoxCellRenderer.OnHasFocusControlChanged()
    GridTextBoxCellRenderer.OnInitialize(Int32, Int32)
    GridTextBoxCellRenderer.OnKeyDown(KeyEventArgs)
    GridTextBoxCellRenderer.OnKeyPress(KeyPressEventArgs)
    GridTextBoxCellRenderer.OnSetControlText(String)
    GridTextBoxCellRenderer.Paste()
    GridTextBoxCellRenderer.ReplaceSel(String)
    GridTextBoxCellRenderer.SetEditState(Object)
    GridTextBoxCellRenderer.SetModelActiveText(String)
    GridTextBoxCellRenderer.SetSelectedText(String, Boolean)
    GridTextBoxCellRenderer.SetTextBoxText(String, Boolean)
    GridTextBoxCellRenderer.TextBox
    GridTextBoxCellRenderer.TextBoxChanged(Object, EventArgs)
    GridTextBoxCellRenderer.TextBoxControl
    GridTextBoxCellRenderer.TextBoxLostFocus(Object, EventArgs)
    GridTextBoxCellRenderer.TextBoxText
    GridTextBoxCellRenderer.TextBoxTextCore
    GridTextBoxCellRenderer.UnwireModel(GridCellModelBase)
    GridTextBoxCellRenderer.WantsAutoSize
    GridTextBoxCellRenderer.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 GridDropDownCellRenderer : GridTextBoxCellRenderer, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
    Remarks

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

    The following table lists some characteristics about the drop-down cell type:

    ItemDescription
    CellTypeNA
    RendererGridDropDownCellRenderer
    ModelGridDropDownCellModel
    XP Themes SupportYes
    Cell ButtonGridCellComboBoxButton
    InteractiveEdit with Text Input or DropDown
    ControlGridDropDownEditPartControl
    Drop-Down ControlCustom
    Floating SupportNo
    Base TypeGridTextBoxCellRenderer

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

    PropertyNameDescription
    AllowEnter (System.Boolean)Gets / sets if pressing the <Enter>-Key should insert a new line into the edited text. (Default: False)
    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)
    CellValue (System.Object)This property holds the cell value. Although the cell value is typically a string, it can also be any other primitive type such as int, byte, enum, or any custom type that is derived from System.Object. (Default: String.Empty)
    CellValueType (System.Type)Specifies the preferred System.Type for cell values. When you assign a value to the GridStyleInfo object, the value will be converted to this type. If the value cannot be converted, Error will contain error information. (Default: NULL)
    Clickable (System.Boolean)Specifies if the drop-down button can be clicked. If set to false, the button will be drawn grayed out. See Enabled for more information on how to disable activating the drop-down cell. (Default: True)
    CultureInfo (System.Globalization.CultureInfo)The culture information holds rules for parsing and formatting the cells value. (Default: NULL)
    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 drop-down button can still be clicked. You should also disable Clickable if you do not want the user to click the drop-down button. (Default: True)
    Error (System.String)Holds error information if a value could not be converted to the System.Type specified with CellValueType. (Default: String.Empty)
    Font (GridFontInfo)The font for drawing text. (Default: GridFontInfo.Default)
    Format (System.String)Gets / sets the format mask for formatting the cell value. You can specify numeric format strings, date format strings, or enumeration format strings as discussed in the section "Format Specifiers and Format Providers" of the .NET Framework Developers Guide (see ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconformatspecifiersformatproviders.htm) (Default: String.Empty)
    HorizontalAlignment (GridHorizontalAlignment)Specifies horizontal alignment of text in the cell. This does not affect the position of the drop=down button. (Default: GridHorizontalAlignment.Left)
    HotkeyPrefix (System.Drawing.Text.HotkeyPrefix)Specifies how hot-key prefixes should be displayed. Hot-keys are indicated in text with an '&' (ampersand). When you enable a hot-key prefix, the specific characters can be displayed underlined or regular. The '&' will not be displayed. (Default: HotkeyPrefix.Show)
    ImageIndex (System.Int32)Specifies an index for an image in the ImageList of a GridStyleInfo instance. (Default: -1)
    ImageList (System.Windows.Forms.ImageList)The ImageList that holds a collection of images. Cells can choose images with the ImageIndex property in a GridStyleInfo instance. (Default: NULL)
    Interior (BrushInfo) Lets you specify a solid backcolor, gradient, or pattern style with both back and fore color for a cell's background. (Default: SystemColors.Window)
    MaxLength (System.Int32)Limits the number of characters the user can type into the cell. Note: When selecting a text from a choice list or when pasting text, the text can be longer. Additional validation is necessary on your side. (Default: 0)
    ReadOnly (System.Boolean)Specifies if cell contents can be modified by the user. You can programatically change Read-only cells by setting DiscardReadOnly to True. (Default: False)
    ShowButtons (GridShowButtons)Specifies when to show or display the drop-down button. Possible choices are: show the button only for the current cell, always show buttons, or never show buttons. (Default: GridShowButtons.Show)
    Text (System.String)Gets / sets the value as a string. If a CellValueType is specified, the text will be parsed and converted to the type specified with CellValueType using any CultureInfo information. (Default: String.Empty)
    TextAlign (GridTextAlign)Align text left of button elements (which is typical for combo boxes). Or align text right of button elements. (Default: GridTextAlign.Default)
    TextColor (System.Drawing.Color)Lets you specify the color for drawing the cell text. (Default: SystemColors.WindowText)
    TextMargins (GridMarginsInfo)Holds text margins in pixels. When drawing a cell, this specifies the empty area between the text rectangle and the borders of the client rectangle of the cell. The client rectangle is the cell rectangle without buttons and borders. (Default: GridMarginsInfo.Default)
    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)
    ValidateValue (GridCellValidateValueInfo)Holds validation rules for the cell value that are being checked before any user changes are committed to the grid cell's style object. (Default: NULL)
    VerticalAlignment (GridVerticalAlignment)Specifies vertical alignment of text and the drop-down button in the cell. (Default: GridVerticalAlignment.Top)
    WrapText (System.Boolean)Specifies if text should be wrapped when it does not fit into a single line. (Default: True)

    Constructors

    GridDropDownCellRenderer(GridControlBase, GridCellModelBase)

    Initializes a new instance of the GridDropDownCellRendererclass for the given GridControlBase and GridCellModelBase.

    Declaration
    public GridDropDownCellRenderer(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.

    Properties

    DropDownContainer

    Gets the container where you can insert child controls to be displayed as drop-down part for your cell.

    Declaration
    public GridDropDownContainer DropDownContainer { get; }
    Property Value
    Type
    GridDropDownContainer

    EditPart

    Gets the text box that is displayed in the user input field for a combo box.

    Declaration
    public TextBoxBase EditPart { get; }
    Property Value
    Type
    System.Windows.Forms.TextBoxBase

    PopupControlContainer

    Gets the container where you can insert child controls to be displayed as drop-down part for your cell.

    Declaration
    public PopupControlContainer PopupControlContainer { get; }
    Property Value
    Type
    PopupControlContainer

    Methods

    CreateTextBox()

    Creates the text box that is shown in-place in the cell when the user starts editing the cell.

    Declaration
    protected override TextBoxBase CreateTextBox()
    Returns
    Type Description
    System.Windows.Forms.TextBoxBase

    Returns the new instance of the GridTextBoxControl.

    Overrides
    GridTextBoxCellRenderer.CreateTextBox()

    ProcessMouseWheel(MouseEventArgs)

    Lets you customize and redirect the mouse wheel behavior to a cell renderer.

    Declaration
    public override bool ProcessMouseWheel(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

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

    Returns
    Type Description
    System.Boolean

    True if the parent grid should not be scrolled; False if the parent grid should scroll.

    Overrides
    GridCellRendererBase.ProcessMouseWheel(MouseEventArgs)

    TextBoxGotFocus(Object, EventArgs)

    Handles the System.Windows.Form.Control.GotFocus event of the text box and raises a CurrentCellControlGotFocus event.

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

    The source of the event.

    System.EventArgs e

    An System.EventARgsthat contains the event data.

    Overrides
    GridTextBoxCellRenderer.TextBoxGotFocus(Object, EventArgs)

    Implements

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