menu

WinForms

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

    Show / Hide Table of Contents

    Class GridDataBoundTreeCellRenderer

    Implements the renderer part for an expandable row header cell in a GridDataBoundGrid. The The expandable row header cell will display a '+' for expanded rows and a '-' for collapsed rows with treelines similar to a TreeControl.

    Inheritance
    System.Object
    NonFinalizeDisposable
    GridCellRendererBase
    GridStaticCellRenderer
    GridTextBoxCellRenderer
    GridDataBoundTreeCellRenderer
    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.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.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.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.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.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.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.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.CreateTextBox()
    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.TextBoxGotFocus(Object, EventArgs)
    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 GridDataBoundTreeCellRenderer : GridTextBoxCellRenderer, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
    Remarks

    Defines the renderer part of a expandable row header cell. A renderer is created for each GridCellModelBase and GridControlBase. There can be several renderers associated with one GridDataBoundTreeCellRenderer if several views display the same GridModel.

    The GridDataBoundGrid registers "DataBoundRowExpandCell" as identifier in CellType of a cells GridStyleInfo to associate this cell type with a cell.

    The following table lists some characteristics about the DataBoundRowExpandCell cell type:

    ItemDescription
    CellTypeDataBoundRowExpandCell
    RendererGridDataBoundTreeCellRenderer
    ModelGridDataBoundTreeCellModel
    XP Themes SupportNo
    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. To hide grid lines for a certain cell, you can set the Style of the specific edge to be None. By default, the right and bottom borders are initialized to Standard and borders are drawn as specified in the DefaultGridBorderStyle property of a GridModel instance. (Default: GridBordersInfo.Default)
    CellAppearance (GridCellAppearance)When set to Flat, the header will be drawn with slightly raised edges typical for cell headers. If the grid is XP Themes enabled the headers will be drawn with XP Themes look. If you specify Sunken or Raised, the header will be drawn with sunken or raised edges and not XP Themed. (Default: GridCellAppearance.Flat)
    CellType (System.String)DataBoundRowExpandCell (Default: Text Box)
    Enabled (System.Boolean)Specifies if the cell can be activated as the3 current cell when the user clicks onto the header. Usually you do not want a header to be activated as the current cell unless you want to have editing capabilities such as allowing users to rename header text in place. Such renaming functionality needs to be implemented in a derived class. (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. If the grid is XP Themes enabled, this color will be ignored and the header will be drawn with default XP Themes header background. (Default: SystemColors.Window)
    TextColor (System.Drawing.Color)Lets you specify the color of the icon. (Default: SystemColors.WindowText)
    TextMargins (GridMarginsInfo)When drawing this header cell this specifies the minimum empty area between the text rectangle without borders and the icon. The icon will be centered inside the remaining rectangle. (Default: GridMarginsInfo.Default)

    Constructors

    GridDataBoundTreeCellRenderer(GridControlBase, GridCellModelBase)

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

    Declaration
    public GridDataBoundTreeCellRenderer(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

    LineColor

    Gets or sets color used for drawing the treelines.

    Declaration
    public Color LineColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    Methods

    Draw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)

    Draws the content for specified cell.

    Declaration
    public override void Draw(Graphics g, Rectangle cellRectangle, int rowIndex, int colIndex, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    Graphics context.

    System.Drawing.Rectangle cellRectangle

    Cell rectangle.

    System.Int32 rowIndex

    Row index.

    System.Int32 colIndex

    Column index.

    GridStyleInfo style

    Cell style information.

    Overrides
    GridCellRendererBase.Draw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)

    OnDrawCellButton(GridCellButton, Graphics, Int32, Int32, Boolean, GridStyleInfo)

    Declaration
    protected override void OnDrawCellButton(GridCellButton button, Graphics g, int rowIndex, int colIndex, bool bActive, GridStyleInfo style)
    Parameters
    Type Name Description
    GridCellButton button
    System.Drawing.Graphics g
    System.Int32 rowIndex
    System.Int32 colIndex
    System.Boolean bActive
    GridStyleInfo style
    Overrides
    GridCellRendererBase.OnDrawCellButton(GridCellButton, Graphics, Int32, Int32, Boolean, GridStyleInfo)

    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[])

    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

    A reference to GridPrepareViewStyleInfoEventArgs that holds the event data.

    Overrides
    GridCellRendererBase.OnPrepareViewStyleInfo(GridPrepareViewStyleInfoEventArgs)

    OnQueryShowButtons(Int32, Int32, GridStyleInfo)

    Declaration
    protected override bool OnQueryShowButtons(int rowIndex, int colIndex, GridStyleInfo style)
    Parameters
    Type Name Description
    System.Int32 rowIndex
    System.Int32 colIndex
    GridStyleInfo style
    Returns
    Type
    System.Boolean
    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