i have been using 2 level grids for a little while now. (a parent row and child row). when you expand the parent row i would like the Child set to open. we have been using some thing like this
Private Sub dgAccounts_RowExpansionChanged(ByVal sender As Object, _ ByVal e As RowExpansionChangedEventArgs) _ Handles dgAccounts.RowExpansionChanged If e.Row.RowType = Infragistics.Silverlight.RowType.DataRow Then
Dim rw As Row = e.Row
For Each childLayout As ChildBand In rw.ChildBands
childLayout.IsExpanded = True Next
End If
End Sub
When we try to use this same set up with a 3 level grid the page freezes at random and then we get an Exception caught by the App.xaml.vb page. here is the message:
"Exception from HRESULT: 0x88000FA8"
we also have a button on these pages that calls this:
Private Sub ExpandRows(ByVal rows As RowCollection)
For Each r As Row In rows
r.IsExpanded = True
If r.HasChildren Then
ExpandRows(r.ChildBands(0).Rows) End If Next End Sub
Is there any way we shouldnt be able to use this set up with another level in the grid?
what would be the recommended way to do this?
thanks
we also do sizing inside and out side the grids using:
Private Sub dgAccounts_LayoutUpdated(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgAccounts.LayoutUpdated
'Me.SetObjectstoGridSize()
IF i comment it out the error seems to occur less
Hello,
I've tried to duplicate the issue in a sample project and the ExpandRows method you are using on a button Click event is working fine to me. I suppose this exception could be caused by the SetObjectstoGridSize() method you are using but will need to reproduce the behaviour. I'm going to create a support ticket for you so we can continue discussion on this.
Vlad
i have update the ticket as well as added two samples of the SetObjectstoGridSize() code