WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridRichTextBoxCellRenderer - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridRichTextBoxCellRenderer

    Implements the renderer part of a rich text cell.

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

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

    This renderer supports editing the contents of the rich text with a drop-down panel. When the user drops the panel, a GridRichTextEntryPanel is shown and the user can format the text and then accept changes by pressing "Save" button.

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

    ItemDescription
    CellTypeRichText
    RendererGridRichTextBoxCellRenderer
    ModelGridRichTextBoxCellModel
    XP Themes SupportYes
    InteractiveEdit with DropDown Panel
    DropDown ControlGridRichTextEntryPanel
    Floating SupportNo
    Base TypeGridStaticCellRenderer

    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)RichText (Default: TextBox)
    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 user can click on any cell button elements in this renderer. (Default: True)
    CultureInfo (System.Globalization.CultureInfo)The culture information holds rules for parsing and formatting the cell's value. (Default: NULL)
    Enabled (System.Boolean)Specifies if the cell can be activated as current cell or if the cell should be skipped when moving the current cell. (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)
    Interior (BrushInfo) Lets you specify a solid backColor, gradient, or pattern style with both back and foreColor for a cell's background. (Default: SystemColors.Window)
    ReadOnly (System.Boolean)Specifies if cell contents can be modified by the user. You can programmatically change Read-only cells by setting DiscardReadOnly to True. (Default: False)
    ShowButtons (GridShowButtons)Specifies when to show or display the cell buttons. 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)
    Themed (System.Boolean)Specifies if cell should be drawn using Windows XP themes when ThemesEnabled has been set. (Default: True)
    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)

    Constructors

    GridRichTextBoxCellRenderer(GridControlBase, GridCellModelBase)

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

    Declaration
    public GridRichTextBoxCellRenderer(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 Description
    GridDropDownContainer

    Methods

    DropDownContainerCloseDropDown(Object, PopupClosedEventArgs)

    Will be called to indicate that the popup child was closed.

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

    The child that was closed.

    PopupClosedEventArgs e

    The event data with a PopupCloseType value.

    Overrides
    GridCellRendererBase.DropDownContainerCloseDropDown(Object, PopupClosedEventArgs)

    DropDownContainerShowedDropDown(Object, EventArgs)

    Occurs after the popup has been dropped-down and made visible.

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

    The source of the event.

    System.EventArgs e

    The System.EventArgsthat contains event data.

    Overrides
    GridCellRendererBase.DropDownContainerShowedDropDown(Object, EventArgs)

    DropDownContainerShowingDropDown(Object, CancelEventArgs)

    Occurs when the drop-down container is about to be shown.

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

    The source of the event.

    System.ComponentModel.CancelEventArgs e

    Event data.

    Overrides
    GridCellRendererBase.DropDownContainerShowingDropDown(Object, CancelEventArgs)

    InitializeDropDownContainer()

    Called to initialize contents of the drop-down container for the first time.

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

    OnBeginEdit()

    Used to change the behavior of the OnBeginEdit event

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

    OnButtonClicked(Int32, Int32, Int32)

    Used to change the behavior of the OnButtonClicked event

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

    Represents the row value

    System.Int32 colIndex

    Represents the column value

    System.Int32 button

    Used to get the value of button

    Overrides
    GridCellRendererBase.OnButtonClicked(Int32, Int32, Int32)

    OnClick(Int32, Int32, MouseEventArgs)

    This is called from GridSelectCellsMouseController 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

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

    Overrides
    GridCellRendererBase.OnClick(Int32, Int32, MouseEventArgs)

    OnDeactivating()

    Used to change the behavior of the OnDeactivating event.

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

    OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)

    This method is called from the cell renderer's draw method to draw the contents of the client bounds for the cell, e.g. the text for a static cell.

    Declaration
    protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Points to the device context.

    System.Drawing.Rectangle clientRectangle

    Specifies the client rectangle. It is the cell rectangle without buttons and borders.

    System.Int32 rowIndex

    Specifies the row id.

    System.Int32 colIndex

    Specifies the column id.

    GridStyleInfo style

    A reference to the style object of the cell.

    Overrides
    GridCellRendererBase.OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
    Remarks

    When drawing cells, it is necessary to determine if the specified cell (with rowIndex and colIndex) is the current cell and if it is active.

    If your control is associated with a control and supports in-place editing and the specified cell is the current cell, you should position the control. Take a look at the GridTextBoxCellRenderer implementation of this method for an example.

    Otherwise, you can simply draw the cell.

    OnEditingComplete()

    Used to change the behavior of the OnEditingComplete event

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

    OnEndEdit()

    Used to change the behavior of the OnEndEdit event

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

    OnInitialize(Int32, Int32)

    This method gets called from the cell renderer's initialize method. Override this method if you need to any initialization for the current cell.

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

    The row index.

    System.Int32 colIndex

    The column index.

    Overrides
    GridCellRendererBase.OnInitialize(Int32, Int32)

    OnSaveChanges()

    This method is called from GridCurrentCell.ConfirmChanges when the current cell was marked as modified. Any drop-downs have been closed at this time. It saves changes for the current cell.

    Declaration
    protected override bool OnSaveChanges()
    Returns
    Type Description
    System.Boolean

    True if changes were saved successfully.

    Overrides
    GridCellRendererBase.OnSaveChanges()

    PanelCancel(Object, EventArgs)

    Event handler for the Cancel event of the GridRichTextEntryPanel.

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

    The source of the event.

    System.EventArgs e

    Event data.

    PanelKeyDown(Object, KeyEventArgs)

    Event handler for the KeyDown event of the GridRichTextEntryPanel.

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

    The source of the event.

    System.Windows.Forms.KeyEventArgs e

    A KeyEventArgs that contains the event data.

    PanelSave(Object, EventArgs)

    Event handler for the Save event of the GridRichTextEntryPanel.

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

    The source of the event.

    System.EventArgs e

    Event data.

    Implements

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