Hello-
I am using a radgrid with a nested details grid. I am trying to do something that would seem rather simple. When the user clicks the expand button on a row with details, any other row's expanded details will collapse. I have tried to collapse all rows in the itemCommand event, but have had no success. Here is my item command event:
Protected Sub grdAvailability_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grdAvailability.ItemCommand
If e.CommandName = "ExpandCollapse" Then
Dim parentGrid = CType(source, RadGrid)
For Each item As GridDataItem In parentGrid.Items
item.Expanded = False
Next
grdAvailability.Items(e.Item.ItemIndex).Selected = True
End If
End Sub
This does not work. When I expand a new row, the details of the previous row are still expanded. Any Ideas on how this can be achieved?
Thanks
I am using a radgrid with a nested details grid. I am trying to do something that would seem rather simple. When the user clicks the expand button on a row with details, any other row's expanded details will collapse. I have tried to collapse all rows in the itemCommand event, but have had no success. Here is my item command event:
Protected Sub grdAvailability_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles grdAvailability.ItemCommand
If e.CommandName = "ExpandCollapse" Then
Dim parentGrid = CType(source, RadGrid)
For Each item As GridDataItem In parentGrid.Items
item.Expanded = False
Next
grdAvailability.Items(e.Item.ItemIndex).Selected = True
End If
End Sub
This does not work. When I expand a new row, the details of the previous row are still expanded. Any Ideas on how this can be achieved?
Thanks