Is there a way to expand all rows in a hierarchical grid ?
I do something like this :
For Each rec In grid.GetRecordsInView(True)
rec.IsExpanded = True
Next
but it doe not seem to be full recursive (deep rows are not expanded).
Is it possible to do it using Xaml ?
In fact my best solution was to create an extension method :
<Extension()> Public Sub ExpandAllRows(grid As XamDataGrid) ExpandAllRows(grid.ViewableRecords, True) End Sub Private Sub ExpandAllRows(vrc As ViewableRecordCollection, expand As Boolean) For Each rec As Record In vrc rec.IsExpanded = expand If rec.HasChildren Then ExpandAllRows(rec.ViewableChildRecords, expand) End If Next End SubNow grid.ExpandAllRows works !
Thank you.
There's nothing built in, but your recursive way is very simple.
HI ,
I am attaching a sample application that expands all the rows in the xamDataGrid.
Sincerely, Matt Developer Support Engineer