Text Property
Description
The text / caption of a GridRecordItem.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property Text() As String
Remarks
This property will contain a reference to the caption of a GridRecordItem when the BeforeDrawRow event is executed. This will only modify the caption of the GridRecordItem; the value will remain unchanged.
Note: If no caption has been set, then the value of the GridRecordItem is displayed.
Example
Changing the Text/Caption of a GridRecordItem (Visual Basic)
This sample illustrates how to change the text/caption of a GridRecordItem using the GridRecordItemMetrics object in the BeforeDrawRow event.
' This constant is declared in the General code section
Const COLUMN_SIZE = 4
' This event is called for each GridRecordItem in each GridRow before it is drawn
Private Sub wndGridControl_BeforeDrawRow(ByVal Row As XtremeGridControl.IGridRow, _
ByVal Item As XtremeGridControl.IGridRecordItem, _
ByVal Metrics As XtremeGridControl.IGridRecordItemMetrics)
' This block of code is only executed if the value of the GridRecordItem is less than 1024 and
' the GridRecordItem is in the GridColumn with index COLUMN_SIZE.
If ((Item.Index = COLUMN_SIZE) AND (Item.Value < 1024)) Then
' This will assign the value of the GridRecordItem and "KB" to the text/caption of the GridRecordItem.
' This will NOT modify the value of the GridRecordItem
Metrics.Text = Item.Value & " KB"
End If
End Sub
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.