Skip to content

GroupRow Property

See Also

GridRow Object | GridColumn Caption Property

See Also


Description

Indicates whether the GridRow is a group row.

Property Type

Read-only property

Syntax (Visual Basic)

Public Property GroupRow() As Boolean

Remarks

A GroupRow of the GridControl is a row that has no associated GridRecord, but has a special text caption instead. The special text caption depends on whether the GroupCaption property has been set for the GridRecordItems that belong to the group. If a GroupCaption has been set, then that is displayed as the special text; otherwise, the caption of the GridColumn is used.

You might need to test if a row is a GroupRow when iterating through the GridControl's collection of rows. To determine if the row has a Record you can access, if your rows are grouped and you try to access the Record of a GroupRow, your program will crash.

Example

GroupRow Sample (Visual Basic)

This sample illustrates how you could use the GroupRow property to test if a row is a group row.

Dim Row As GridRow

' Iterate through the GridControl's collection of GridRow objects
For Each Row In wndGridControl.Rows
    ' If the row is not a GroupRow then execute this code
    ' If the rows are grouped, this check has to be made before working with
    ' the GridRecord of the row
    If Row.GroupRow = False Then
        ' Print the value of the 3rd GridRecordItem of the attached GridRecord
        Debug.Print "Record Value: " & Row.Record.Item(2).Value
    End If
Next

See Also

GridRow Object | GridColumn Caption Property


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