Value Property
See Also

Description
The current value of the GridRecordItem.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property Value() As Variant
Remarks
Returns or sets the Value of the GridRecordItem. You can assign just about any type of data to this property. If no caption is assigned, the value will be displayed in the GridRecordItem if possible.
Example
Setting the Value of a GridControlItem (Visual Basic)
This sample illustrates how to set the Value of a GridRecordItem at runtime and when the item is added to the GridControl.
Dim Record As GridRecord
Dim Item As GridRecordItem
' Adds a record/row to the GridControl
Set Record = wndGridControl.Records.Add
' When a GridRecordItem is added, that parameter passed to the AddItem method will be the Value of
' the GridRecordItem.
' Adds a GridRecordItem with no value, this item will only display a checkbox, the state of the
' checkbox can be found with the Checked property
Set Item = Record.AddItem("")
Item.HasCheckbox = True
Item.Checked = False
' Adds a GridRecordItem with a value of "RE: Your Invoice"
Record.AddItem "RE: Your Invoice"
' Adds a GridRecordItem with a value of "John Smith"
Record.AddItem "John Smith"
' Adds a GridRecordItem with a value of "19/06/2004"
Record.AddItem "19/06/2004"
' Adds a GridRecordItem with a value of "18k"
Record.AddItem "18k"
' Add the record/row to the GridControl
wndGridControl.Populate
' This code will change the Value of the 5th GridRecordItem in the
' 1st GridRecord/Row at runtime. This will change the Value from "18K"
' to "50K".
wndGridControl.Records(0).Item(4).Value = "50K"
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.