DrawItem Event
Description
Occurs when a GridRecordItem is drawn.
Syntax
Public Event DrawItem( _
ByVal [Row](#) As [GridRow](XtremeGridControl~GridRow.md), _
ByVal [Column](#) As [GridColumn](XtremeGridControl~GridColumn.md), _
ByVal [Item](#) As [GridRecordItem](XtremeGridControl~GridRecordItem.md), _
ByVal [hDC](#) As Integer, _
ByVal [left](#) As Long, _
ByVal [top](#) As Long, _
ByVal [right](#) As Long, _
ByVal [bottom](#) As Long, _
ByRef [DoDefault](#) As Boolean _
)
Parameters
-
Row
The GridRow that contains the GridRecordItem that is currently being drawn. -
Column
The GridColumn that contains the items that are currently being drawn. -
Item
The GridRecordItem in the GridRow that is currently being drawn. -
hDC
Window device context for WinApi drawing calls. -
left
Specifies the x-coordinate of the upper-left corner of the bounding rectangle that the item is drawn in. -
top
Specifies the y-coordinate of the upper-left corner of the bounding rectangle that the item is drawn in. -
right
Specifies the x-coordinate of the lower-right corner of the bounding rectangle that the item is drawn in. -
bottom
Specifies the y-coordinate of the lower-right corner of the bounding rectangle that the item is drawn in. -
DoDefault
True to allow the GridControl to draw the item normally.
False to do custom drawing. For example, drawing a progress bar in the item or changing the text.
Remarks
Note: By default, this event will not occur. The SetCustomDraw method must be used to enable this event.
The DrawItem event can be used to do custom drawing such as drawing a progress bar in the item. To do custom drawing, DoDefault must be False.
See Also
- TrackControl Control
- XTPGridCustomDraw Enumeration
- SetCustomDraw Method
- BeforeDrawRow Event
- MeasureRow Event

Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.