menu

WinForms

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

    Show / Hide Table of Contents

    Class GridComboBoxCellRenderer

    Implements the renderer part of a combo box cell.

    Inheritance
    System.Object
    NonFinalizeDisposable
    GridCellRendererBase
    GridStaticCellRenderer
    GridTextBoxCellRenderer
    GridDropDownCellRenderer
    GridComboBoxCellRenderer
    GridTableFilterBarExtCellRenderer
    GridTableFilterBarCellRenderer
    Implements
    IQueryFocusInside
    IGridDropDownCell
    IPopupParent
    IPopupItem
    System.IDisposable
    Inherited Members
    GridCellRendererBase.AddButton(GridCellButton)
    GridCellRendererBase.AlwaysRaiseCellClick
    GridCellRendererBase.ClickOverImage
    GridCellRendererBase.ColIndex
    GridCellRendererBase.Control
    GridCellRendererBase.ControlDoubleClick(Object, EventArgs)
    GridCellRendererBase.ControlMouseDown(Object, MouseEventArgs)
    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.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.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.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.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.OnQueryShowButtons(Int32, Int32, GridStyleInfo)
    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()
    GridDropDownCellRenderer.CreateTextBox()
    GridDropDownCellRenderer.DropDownContainer
    GridDropDownCellRenderer.EditPart
    GridDropDownCellRenderer.PopupControlContainer
    GridDropDownCellRenderer.TextBoxGotFocus(Object, EventArgs)
    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.GetEditState()
    GridTextBoxCellRenderer.GetSelectedText(String)
    GridTextBoxCellRenderer.IgnoreTextBoxChanged
    GridTextBoxCellRenderer.InNotifyCurrentCellChangedException
    GridTextBoxCellRenderer.InSetTextBoxTextCore
    GridTextBoxCellRenderer.InTextBoxChanged
    GridTextBoxCellRenderer.LimitTextLength
    GridTextBoxCellRenderer.ModelUpdateActiveText()
    GridTextBoxCellRenderer.OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
    GridTextBoxCellRenderer.OnHasFocusControlChanged()
    GridTextBoxCellRenderer.Paste()
    GridTextBoxCellRenderer.ReplaceSel(String)
    GridTextBoxCellRenderer.SetEditState(Object)
    GridTextBoxCellRenderer.SetModelActiveText(String)
    GridTextBoxCellRenderer.SetSelectedText(String, Boolean)
    GridTextBoxCellRenderer.SetTextBoxText(String, Boolean)
    GridTextBoxCellRenderer.TextBox
    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 GridComboBoxCellRenderer : GridDropDownCellRenderer, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
    Remarks

    GridComboBoxCellRenderer can be customized with DataSource, ValueMember, and DisplayMember properties of a GridStyleInfo instance.

    If you do not have a data source object, you can also fill the drop-down list contents with a ChoiceList and optionally specify ExclusiveChoiceList.

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

    There can be several renderers associated with one GridComboBoxCellModel if several views display the same GridModel.

    Use "ComboBox" as identifier in CellType of a cells GridStyleInfo to associate this cell type with a cell.

    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 should 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)Combo Box (Default: Text Box)
    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)
    ChoiceList (System.Collections.Specialized.StringCollection)Specifies items to be displayed in the drop-down list. (Default: NULL)
    Clickable (System.Boolean)Specifies if the combo box button can be clicked. If set to False, the button will be drawn grayed out. See Enabled for information on how to disable activating the combo box cell. (Default: True)
    CultureInfo (System.Globalization.CultureInfo)The culture information holds rules for parsing and formatting the cell's value. (Default: NULL)
    DataSource (System.Object)Specifies a data source that holds items to be displayed in a drop-down list. A data source can be specified instead of manually filling the choicelist with string entries. (Default: NULL)
    DisplayMember (System.String)Names the property in the data source that holds the text to be displayed in a cell that depends on a ValueMember. (Default: String.Empty)
    DropDownStyle (GridDropDownStyle)Specifies if user input is restricted to items from the ChoiceList or DataSource. (Default: GridDropDownStyle.Editable)
    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 combo box button can still be clicked but no drop-down list is displayed. You should also disable Clickable if you do not want the user to click the combo box button. (Default: True)
    Error (System.String)Holds error information if a value can not be converted to the System.Type specified with CellValueType. (Default: String.Empty)
    ExclusiveChoiceList (System.Boolean)Specifies if user input is restricted to items from choice list or data source. It is recommended to use DropDownStyle instead. (Default: False)
    Font (GridFontInfo)The font for drawing text. (Default: GridFontInfo.Default)
    HorizontalAlignment (GridHorizontalAlignment)Specifies horizontal alignment of text in the cell. This does not affect the position of the combo box button. (Default: GridHorizontalAlignment.Left)
    ImageIndex (System.Int32)Specifies an index for a image in the ImageList of a GridStyleInfo instance. The image is currently only shown in the text field, not in the drop-down list. You have to add custom programming logic in order to set the ImageIndex based on a selection in the drop-down list. (Default: -1)
    Interior (BrushInfo) Lets you specify a solid back color, gradient, or pattern style with both back and fore color for a cell's background. (Default: SystemColors.Window)
    ReadOnly (System.Boolean)Specifies if cell contents can be modified by the user. The user can still drop-down the combo box but changes will not be saved back into the text field. (Default: False)
    ShowButtons (GridShowButtons)Specifies when to show or display the combo box 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)
    ValueMember (System.String)Names the property in the data source that holds the key to be saved in a cell. (Default: String.Empty)
    VerticalAlignment (GridVerticalAlignment)Specifies vertical alignment of text 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

    GridComboBoxCellRenderer(GridControlBase, GridCellModelBase)

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

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

    The GridControlBase that display this cell renderer.

    GridCellModelBase cellModel

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

    Remarks

    References to GridControlBase, and GridCellModelBase will be saved.

    Properties

    AllowValidateStringOnKeyPress

    Gets or sets a value indicating whether the combo box should raise CurrentCellValidateString notifications when the user types into the combo box. Default is true.

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

    Note: In version 3.3 and earlier the combo box did not raise these notifications. To maintain compatibility this option allows you to turn off this behavior.

    ControlText

    Gets or sets the active text that is displayed on the cell.

    Declaration
    public override string ControlText { get; set; }
    Property Value
    Type
    System.String
    Overrides
    GridCellRendererBase.ControlText

    ListBoxPart

    Gets or sets the System.Windows.Forms.ListBox that is displayed when the user drops-down the combo box.

    Declaration
    public ListBox ListBoxPart { get; set; }
    Property Value
    Type
    System.Windows.Forms.ListBox

    Model

    Gets the GridComboBoxCellModel that this cell renderer belongs to.

    Declaration
    public GridComboBoxCellModel Model { get; }
    Property Value
    Type
    GridComboBoxCellModel

    Methods

    AttachListBoxPart()

    Called to attach a list box part to this renderer object.

    Declaration
    protected virtual void AttachListBoxPart()

    ChildClosing(IPopupChild, PopupCloseType)

    Occurs when the popup child is being closed.

    Declaration
    public override void ChildClosing(IPopupChild childUI, PopupCloseType popupCloseType)
    Parameters
    Type Name Description
    IPopupChild childUI

    The pop up.

    PopupCloseType popupCloseType

    The way in which the pop up is closed.

    Overrides
    GridCellRendererBase.ChildClosing(IPopupChild, PopupCloseType)

    CreateListBoxPart()

    Creates a GridComboBoxListBoxPart that is used as list box inside the drop-down.

    Declaration
    protected virtual ListBox CreateListBoxPart()
    Returns
    Type Description
    System.Windows.Forms.ListBox

    A GridComboBoxListBoxPart that is derived from System.Windows.Forms.ListBox

    DetachListBoxPart()

    Called to detach the list box part from this renderer object.

    Declaration
    protected virtual void DetachListBoxPart()

    Dispose(Boolean)

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

    DropDownContainerShowedDropDown(Object, EventArgs)

    Occurs after the pop up has been dropped down and made visible.

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

    Combobox cell renderer.

    System.EventArgs e

    The event args.

    Overrides
    GridCellRendererBase.DropDownContainerShowedDropDown(Object, EventArgs)

    DropDownContainerShowingDropDown(Object, CancelEventArgs)

    Occurs when the drop down is about to be shown.

    Declaration
    public override void DropDownContainerShowingDropDown(object sender, CancelEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    Combobox cell renderer.

    System.ComponentModel.CancelEventArgs e

    Event args.

    Overrides
    GridCellRendererBase.DropDownContainerShowingDropDown(Object, CancelEventArgs)

    FindItem(String, Boolean, Int32, Boolean)

    Finds text in the list box.

    Declaration
    public virtual int FindItem(string prefix, bool selectItem, int start, bool ignoreCase)
    Parameters
    Type Name Description
    System.String prefix

    The text (or prefix) to find.

    System.Boolean selectItem

    True if you want to select the text in the list box.

    System.Int32 start

    The first index to start searching.

    System.Boolean ignoreCase

    True if case can be ignored; False if case sensitive.

    Returns
    Type Description
    System.Int32

    The index of the entry that starts with the text; -1 if no entry could be found.

    FindItemExact(String, Boolean, Int32, Boolean)

    Finds text in the list box.

    Declaration
    public virtual int FindItemExact(string text, bool selectItem, int start, bool ignoreCase)
    Parameters
    Type Name Description
    System.String text

    The text (or prefix) to find.

    System.Boolean selectItem

    True if you want to select the text in the list box.

    System.Int32 start

    The first index to start searching.

    System.Boolean ignoreCase

    True if case can be ignored; False if case sensitive

    Returns
    Type Description
    System.Int32

    The index of the entry that starts with the text; -1 if no entry could be found.

    InitializeDropDownContainer()

    Overridden to initialize drop down container.

    Declaration
    protected override void InitializeDropDownContainer()
    Overrides
    GridCellRendererBase.InitializeDropDownContainer()

    ListBoxClick(Object, EventArgs)

    Handles the System.Windows.Forms.Control.Click event of the list box.

    Declaration
    protected virtual void ListBoxClick(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.

    ListBoxMouseUp(Object, MouseEventArgs)

    Handles the System.Windows.Forms.Control.MouseUp event of the list box.

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

    The source of the event.

    System.Windows.Forms.MouseEventArgs e

    A System.Windows.Forms.MouseEventArgs with event data

    NotifyCurrentCellChanged()

    Overridden to call the NotifyCurrentCellChanged() method.

    Declaration
    protected override void NotifyCurrentCellChanged()
    Overrides
    GridTextBoxCellRenderer.NotifyCurrentCellChanged()

    OnClick(Int32, Int32, MouseEventArgs)

    Invoked when the user clicked inside a cell.

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

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs e

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

    Overrides
    GridTextBoxCellRenderer.OnClick(Int32, Int32, MouseEventArgs)

    OnDeactivating()

    Closes the DropDown if the CurrentCell is deactivated along with BrowseOnly property

    Declaration
    protected override bool OnDeactivating()
    Returns
    Type
    System.Boolean
    Overrides
    GridCellRendererBase.OnDeactivating()

    OnDoubleClick(Int32, Int32, MouseEventArgs)

    Called when the user double-clicks inside a cell.

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

    The row index.

    System.Int32 colIndex

    The column index.

    System.Windows.Forms.MouseEventArgs e

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

    Overrides
    GridTextBoxCellRenderer.OnDoubleClick(Int32, Int32, MouseEventArgs)

    OnEditPartMouseDown(Object, MouseEventArgs)

    Handles the System.Windows.Forms.Control.MouseDown event of the active text box.

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

    The source of the event.

    System.Windows.Forms.MouseEventArgs e

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

    OnInitialize(Int32, Int32)

    Overridden to initialize the list box style and value.

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

    OnKeyDown(KeyEventArgs)

    Overridden to set the starting point and length of the text selected and set the text in the Text box.

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

    OnKeyPress(KeyPressEventArgs)

    Invoked when user pressed key.

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

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

    Overrides
    GridTextBoxCellRenderer.OnKeyPress(KeyPressEventArgs)

    OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs)

    Allows custom formatting of a cell by changing its style object.

    Declaration
    public override void OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs e)
    Parameters
    Type Name Description
    GridPrepareViewStyleInfoEventArgs e

    An System.EventARgsthat contains the event data.

    Overrides
    GridCellRendererBase.OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs)

    OnRejectChanges()

    Overridden to get the GridStyleInfo of the cells and sets the list box part text.

    Declaration
    protected override void OnRejectChanges()
    Overrides
    GridCellRendererBase.OnRejectChanges()

    OnSetControlText(String)

    Overridden to sets the control text to the list box part.

    Declaration
    protected override void OnSetControlText(string text)
    Parameters
    Type Name Description
    System.String text
    Overrides
    GridTextBoxCellRenderer.OnSetControlText(String)

    ProcessMouseWheel(MouseEventArgs)

    Allows the cell renderer to process the mouse wheel.

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

    A System.Windows.Form.MouseEventArgs holding the event data.

    Returns
    Type Description
    System.Boolean

    True if the popup child is dropped down and the new scroll position is valid.

    Overrides
    GridDropDownCellRenderer.ProcessMouseWheel(MouseEventArgs)

    SynchronizeDisplayText(Int32)

    Retrieves the text from the list box index and sets the TextBoxText. Called when the user presses arrow keys to move selection in dropped list box.

    Declaration
    protected virtual void SynchronizeDisplayText(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The list box index

    TextBoxChanged(Object, EventArgs)

    Occurs when the System.Windows.Forms.Control.TextChanged event of the TextBox is raised.

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

    The source of the event.

    System.EventArgs e

    An System.EventArgsthat contains event data.

    Overrides
    GridTextBoxCellRenderer.TextBoxChanged(Object, EventArgs)

    ValidateString(String)

    Checks if the specified text is valid.

    Declaration
    public override bool ValidateString(string text)
    Parameters
    Type Name Description
    System.String text

    The specified text.

    Returns
    Type Description
    System.Boolean

    True if it is valid.

    Overrides
    GridCellRendererBase.ValidateString(String)

    Implements

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