Class GridTableIndentCellRenderer
Implements the renderer part of an indent cell which is used inside the grouping grid to display indention of groups or tables and optionally draw tree-lines.
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid.Grouping
Assembly: Syncfusion.Grid.Grouping.Windows.dll
Syntax
public class GridTableIndentCellRenderer : GridCellRendererBase, IQueryFocusInside, IGridDropDownCell, IPopupParent, IPopupItem, IDisposable
Remarks
The Text property is used to indicate which part of a tree-line to be drawn. Possible line part types are:
Text | Descriptions |
---|---|
T | A T-node. |
L | The last node. |
I | A continues line. |
Constructors
GridTableIndentCellRenderer(GridControlBase, GridCellModelBase)
Initializes a new instance of the GridCheckBoxCellRenderer class for the given GridControlBase and GridCellModelBase.
Declaration
public GridTableIndentCellRenderer(GridControlBase grid, GridCellModelBase cellModel)
Parameters
Type | Name | Description |
---|---|---|
GridControlBase | grid | The GridControlBase that displays this cell renderer. |
GridCellModelBase | cellModel | The GridCellModelBase which holds data for GridTableIndentCellRenderer class that should be shared among views. |
Remarks
References to GridControlBase and GridCellModelBase will be saved.
Properties
Grid
Gets the value of the GridTableControl instance which is a reference to the parent grid.
Declaration
public GridTableControl Grid { get; }
Property Value
Type |
---|
GridTableControl |
Methods
Draw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
Overrides and draws the contents of a 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 | An instance of the GridStyleInfo that holds the values of style properties. |
Overrides
OnClick(Int32, Int32, MouseEventArgs)
Overrides and triggered when the System.Windows.Forms.Control.Click event is done.
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.MouseEventArgs contains the event data. |
Overrides
Remarks
you can suppress this event while clicking inside of the cell.
OnDraw(Graphics, Rectangle, Int32, Int32, GridStyleInfo)
Overrides and raises the OnDraw() method to draw the contents of the cells.
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 index. |
System.Int32 | colIndex | Specifies the column index. |
GridStyleInfo | style | An instance of the GridStyleInfo that holds the values of style properties. |
Overrides
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.