Imports Infragistics.Windows.DataPresenter ... 'You can call the IterateRecords method using the following line of code: 'IterateRecords(Me.xamDataPresenter1.Records) Public Sub IterateRecords(ByVal records As RecordCollectionBase) For Each rec As Record In records If rec.RecordType = RecordType.GroupByField OrElse rec.RecordType = RecordType.GroupByFieldLayout Then Dim groupRecord As GroupByRecord = DirectCast(rec, GroupByRecord) 'TODO: Add logic to process the group by record If groupRecord.HasChildren Then IterateRecords(groupRecord.ChildRecords) End If ElseIf rec.RecordType = RecordType.DataRecord Then Dim dataRecord As DataRecord = DirectCast(rec, DataRecord) 'TODO: Add logic to process the data record If dataRecord.HasChildren Then IterateRecords(dataRecord.ChildRecords) End If ElseIf rec.RecordType = RecordType.ExpandableFieldRecord Then Dim expandableRecord As ExpandableFieldRecord = DirectCast(rec, ExpandableFieldRecord) 'TODO: Add logic to process the expandable field record If expandableRecord.HasChildren Then IterateRecords(expandableRecord.ChildRecords) End If End If Next End Sub