menu

WinForms

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

    Show / Hide Table of Contents

    Class GridTextBoxControl

    Implements the text box that is shown in a GridTextBoxCellRenderer when the user starts editing the cell.

    Inheritance
    System.Object
    GridTextBoxControl
    GridDropDownEditPartControl
    Implements
    IGridTextBoxControl
    ISupportsPopupControlContainer
    Namespace: Syncfusion.Windows.Forms.Grid
    Assembly: Syncfusion.Grid.Windows.dll
    Syntax
    public class GridTextBoxControl : RichTextBox, IGridTextBoxControl, ISupportsPopupControlContainer

    Constructors

    GridTextBoxControl(GridTextBoxCellRenderer)

    Initializes a new GridTextBoxControl and attaches it to a GridTextBoxCellRenderer

    Declaration
    public GridTextBoxControl(GridTextBoxCellRenderer parent)
    Parameters
    Type Name Description
    GridTextBoxCellRenderer parent

    The GridTextBoxCellRenderer that the cell belongs to.

    Properties

    CreateParams

    Gets the required creation parameters when the control handle is created.

    Declaration
    protected override CreateParams CreateParams { get; }
    Property Value
    Type
    System.Windows.Forms.CreateParams

    DroppedDown

    Gets or sets a value indicating whether the dropped-down state will shows or hides the drop-down window.

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

    Floatable

    Gets or sets a value indicating whether the cell supports floating over another cell.

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

    FloatDone

    Gets or sets a value indicating whether the cell was floated over another cell after the user inserted text. Will be reset when the cell is redrawn.

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

    InImeComposition

    Gets a value indicating whether WM_IME_STARTCOMPOSITION was sent and False once WM_IME_ENDCOMPOSITION was handled.

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

    Initializing

    Gets a value indicating whether BeginInit() was called.

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

    IsSuspendEvents

    Gets a value indicating whether raising events is temporarily disabled.

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

    ParentCell

    Gets the associated cell renderer for the text box.

    Declaration
    public GridCellRendererBase ParentCell { get; }
    Property Value
    Type
    GridCellRendererBase

    PopupControlContainer

    Gets or sets the container this child control is associated with.

    Declaration
    protected virtual IGridDropDownContainer PopupControlContainer { get; set; }
    Property Value
    Type
    IGridDropDownContainer

    SelectedText

    Gets or sets the selected text within the System.Windows.Forms.RichTextBox.

    Declaration
    public override string SelectedText { get; set; }
    Property Value
    Type
    System.String

    Text

    Gets or sets the current text in the rich text box.

    Declaration
    public override string Text { get; set; }
    Property Value
    Type
    System.String

    Methods

    BeginInit()

    Suspends raising Modified events until EndInit is called and set Initializing property to true. You should check Initializing your cell renderer's implementation to see if changes in the text box are done because of initialization or user interaction.

    Declaration
    public void BeginInit()

    EndInit()

    Resume raising modified events and resets the Initializing property.

    Declaration
    public void EndInit()

    IsInputKey(Keys)

    Determines whether the specified key is an 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 key's values.

    Returns
    Type Description
    System.Boolean

    Gets a value indicating whether the navigating keys can be used

    LineScroll(Int32)

    Scroll the specified number of lines.

    Declaration
    public void LineScroll(int count)
    Parameters
    Type Name Description
    System.Int32 count

    The number of lines to scroll.

    Remarks

    Sends an EM_LINESCROLL message to the control.

    OnContentsResized(ContentsResizedEventArgs)

    Raises the System.Windows.Forms.RichTextBox.ContentsResized event.

    Declaration
    protected override void OnContentsResized(ContentsResizedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ContentsResizedEventArgs e

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

    OnEnter(EventArgs)

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

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

    An System.EventArgsthat contains event data.

    OnGotFocus(EventArgs)

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

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

    An System.EventArgsthat contains event data.

    OnHandleDestroyed(EventArgs)

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

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

    An System.EventArgsthat contains event data.

    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.KeyEventArgsthat contains 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.KeyEventArgsthat contains 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.KeyEventArgsthat contains event data.

    OnLeave(EventArgs)

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

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

    An System.EventArgsthat contains event data.

    OnLostFocus(EventArgs)

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

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

    An System.EventArgsthat contains event data.

    OnMouseWheel(MouseEventArgs)

    Overridden to raise the System.Windows.Forms.Control.MouseWheel event.

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

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

    OnPaintBackground(PaintEventArgs)

    Paints the background of the control.

    Declaration
    protected override void OnPaintBackground(PaintEventArgs pevent)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs pevent

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

    OnTextChanged(EventArgs)

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

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

    An System.EventArgsthat contains event data.

    PreProcessMessage(ref Message)

    Preprocesses the keyboard and 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

    Message that loops for input.

    Returns
    Type Description
    System.Boolean

    True if they are preprocessed.

    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 instance passed by reference, that represents the window message to process.

    Returns
    Type Description
    System.Boolean

    Gets a value indicating whether the key message has to be processed

    ResumeEvents()

    Resumes raising events.

    Declaration
    public void ResumeEvents()

    Select(Boolean, Boolean)

    Activates a child control. Optionally specifies the direction in the tab order to select the control from.

    Declaration
    protected override void Select(bool directed, bool forward)
    Parameters
    Type Name Description
    System.Boolean directed

    True to specify the direction of the control to select; otherwise, false.

    System.Boolean forward

    True to move forward in the tab order; false to move backward in the tab order.

    SuspendEvents()

    Suspends raising events.

    Declaration
    public void SuspendEvents()

    WndProc(ref Message)

    Declaration
    protected override void WndProc(ref Message msg)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg

    Explicit Interface Implementations

    IGridTextBoxControl.TextBoxMargins

    Gets the default text box margins.

    Declaration
    GridMargins IGridTextBoxControl.TextBoxMargins { get; }
    Returns
    Type
    GridMargins

    ISupportsPopupControlContainer.PopupControlContainer

    Declaration
    IGridDropDownContainer ISupportsPopupControlContainer.PopupControlContainer { get; set; }
    Returns
    Type
    IGridDropDownContainer

    Implements

    IGridTextBoxControl
    ISupportsPopupControlContainer
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved