Syncfusion.Grid.Windows


Points to the device context.
Specifies the cell rectangle.
Specifies the row id.
Specifies the column id.
A reference to the style of the cell.

Draw Method (GridCellRendererBase)

Draw the contents of the specified cell.
Syntax
'Declaration
 
Public Overridable Sub Draw( _
   ByVal g As Graphics, _
   ByVal cellRectangle As Rectangle, _
   ByVal rowIndex As Integer, _
   ByVal colIndex As Integer, _
   ByVal style As GridStyleInfo _
) 
'Usage
 
Dim instance As GridCellRendererBase
Dim g As Graphics
Dim cellRectangle As Rectangle
Dim rowIndex As Integer
Dim colIndex As Integer
Dim style As GridStyleInfo
 
instance.Draw(g, cellRectangle, rowIndex, colIndex, style)

Parameters

g
Points to the device context.
cellRectangle
Specifies the cell rectangle.
rowIndex
Specifies the row id.
colIndex
Specifies the column id.
style
A reference to the style of the cell.
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.

Please note that you should first call DrawBackground to draw the background and borders as specified in the style object.

The base-class version of this method first calls PerformLayout and then the cell renderers OnDraw method. After the inner cell has been drawn, it will draw each cell button for the cell. Overriding this method is normally not necessary. In most cases, it is sufficient to override the OnDraw method.

AssemblyVersion

Syncfusion.Grid.Windows: 18.2460.0.44

See Also