Class GridDrawCellButtonEventArgs
Provides data about the cancelable DrawCellButton event.
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public sealed class GridDrawCellButtonEventArgs : SyncfusionCancelEventArgs
Remarks
GridDrawCellButtonEventArgs is a custom event argument class used by the DrawCellButton event to allow custom drawing of a cell button elements. Set the Cancel property true if you have drawn the cell button elements and do not want the grid to proceed with default drawing of the cell button elements.
The event will automatically be called for every button inside a cell.
You should handle this event if you want to provide your own drawing of the button. The difference to DrawCellButtonBackground event is that this event is called to draw the whole button, not just its background.
Be sure to set e.Cancel to True if you did your own drawing.
Constructors
GridDrawCellButtonEventArgs(GridCellButton, Graphics, Int32, Int32, Boolean, GridStyleInfo)
Initializes a new instances for GridDrawCellButtonEventArgs class.
Declaration
public GridDrawCellButtonEventArgs(GridCellButton button, Graphics graphics, int rowIndex, int colIndex, bool isActive, GridStyleInfo style)
Parameters
Type | Name | Description |
---|---|---|
GridCellButton | button | The GridCellButton to be drawn. |
System.Drawing.Graphics | graphics | The System.Drawing.Graphics context of the canvas. |
System.Int32 | rowIndex | The row index. |
System.Int32 | colIndex | The column index. |
System.Boolean | isActive | True if this is the active current cell; False otherwise. |
GridStyleInfo | style | The GridStyleInfo object that holds cell information. |
Properties
Button
Gets the GridCellButton to be drawn.
Declaration
[TraceProperty(true)]
public GridCellButton Button { get; }
Property Value
Type |
---|
GridCellButton |
ColIndex
Gets the column index.
Declaration
[TraceProperty(true)]
public int ColIndex { get; }
Property Value
Type |
---|
System.Int32 |
Graphics
Gets the System.Drawing.Graphics context of the canvas.
Declaration
public Graphics Graphics { get; }
Property Value
Type |
---|
System.Drawing.Graphics |
IsActive
Gets a value indicating whether to active current cell. True if this is the active current cell; False otherwise.
Declaration
[TraceProperty(true)]
public bool IsActive { get; }
Property Value
Type |
---|
System.Boolean |
RowIndex
Gets the row index.
Declaration
[TraceProperty(true)]
public int RowIndex { get; }
Property Value
Type |
---|
System.Int32 |
Style
Gets the GridStyleInfo object that holds cell information.
Declaration
public GridStyleInfo Style { get; }
Property Value
Type |
---|
GridStyleInfo |