Syncfusion.Grid.Windows


Points to the device context.
Specifies the client rectangle. It is the cell rectangle without buttons and borders.
Specifies the row id.
Specifies the column id.
A reference to the style object of the cell.

OnDraw Method (GridCellRendererBase)

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.
Syntax
'Declaration
 
Protected Overridable Sub OnDraw( _
   ByVal g As Graphics, _
   ByVal clientRectangle As Rectangle, _
   ByVal rowIndex As Integer, _
   ByVal colIndex As Integer, _
   ByVal style As GridStyleInfo _
) 
'Usage
 
Dim instance As GridCellRendererBase
Dim g As Graphics
Dim clientRectangle As Rectangle
Dim rowIndex As Integer
Dim colIndex As Integer
Dim style As GridStyleInfo
 
instance.OnDraw(g, clientRectangle, rowIndex, colIndex, style)

Parameters

g
Points to the device context.
clientRectangle
Specifies the client rectangle. It is the cell rectangle without buttons and borders.
rowIndex
Specifies the row id.
colIndex
Specifies the column id.
style
A reference to the style object 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.

AssemblyVersion

Syncfusion.Grid.Windows: 18.2460.0.44

See Also