Childs Property
See Also
GridRecord Collection | Expanded Property | TreeColumn Property

Description
A collection of GridRecords displayed when the expand/collapse button is expanded.
Property Type
Read-only property
Syntax (Visual Basic)
Public Property Childs() As [GridRecords](XtremeGridControl~GridRecords.md)
Remarks
The records that are added to this child collection of records will be displayed when the expand/collapse button is pressed. The expand/collapse button is displayed if there are some children in the collection and the TreeColumn property of the GridColumn the record is in is True. Then an expand/collapse button will be drawn. The button can be pressed to display or hide the child GridRecords.
Example
Accessing Child Record/Rows (Visual Basic)
This sample illustrates how to add a child record/row to the Grid control, and how you can access the child record/rows.
Dim Record As GridRecord
Dim ChildRecord As GridRecord
Dim Item As GridRecordItem
' This is the parent Record that will have a GridRecordItem
' added to its collection of child GridRecordItems.
Set Record = wndGridControl.Records.Add
Set Item = Record.AddItem("")
Item.HasCheckbox = True
Item.Checked = False
Record.AddItem "RE: Your Invoice"
Record.AddItem "John Smith"
Record.AddItem "19/06/2004"
Record.AddItem "18k"
' This record will be added to the parent record's collection of child
' GridRecordItem's. All child records will be displayed when the
' expand/collapse button is pressed.
Set ChildRecord = Record.Childs.Add()
Set Item = ChildRecord.AddItem("")
Item.HasCheckbox = True
Item.Checked = False
ChildRecord.AddItem "RE: Your Invoice"
ChildRecord.AddItem "Tom Green"
ChildRecord.AddItem "21/06/2004"
ChildRecord.AddItem "14k"
' Add the record/row to the GridControl
wndGridControl.Populate
' This code is changing the caption of the 3rd item of the 1st child of the 1st record/row
wndGridControl.Records(0).Childs(0).Item(2).Caption = "Child Record"
' This is another way to access the same child record/rows.
' This code is changing the caption of the 3rd item of the 1st child of the 1st record/row
wndGridControl.Rows(0).Childs(0).Record.Item(2).Caption = "Child Record"
See Also
GridRecord Collection | Expanded Property | TreeColumn Property
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.