Checked Property
See Also

Description
Specifies whether the CheckBox is checked if the GridRecordItem contains a CheckBox.
Property Type
Read-write property
Syntax (Visual Basic)
Public Property Checked() As Boolean
Remarks
-
If
TRUE, and the GridRecordItem contains a CheckBox, then the checkbox will have a check mark. You can use this property to determine if the CheckBox has a check mark (is checked). -
If
FALSE, then there is no check mark in the CheckBox. You can set this property toFALSEto remove a check mark. -
If the GridRecordItem does not have a CheckBox, then setting this property has no effect. However, you can still set this property for your own use.
Example
Checked Sample (Visual Basic)
This sample illustrates how you can use the Checked property to check and un-check a GridRecordItem checkbox.
' The KeyDown event can be used to execute code for various key combinations
Private Sub wndGridControl_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
' If the SpaceBar is pressed (Spacebar keycode = 32), execute this code
' Record(0) contains a GridRecordItem with HasCheckBox = True, this code
' will toggle the checkmark in the checkbox of the row that currently has
' focus when the SpaceBar is pressed.
If (KeyCode = 32) Then
Dim Item As GridRecordItem
' Item will now contain a reference to 1st GridRecordItem
Set Item = wndGridControl.FocusedRow.Record(0)
' Toggles the checkmark in the checkbox
Item.Checked = Not Item.Checked
End If
End Sub
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.