Okay, I found where I get hit.
This one is Grid - Hierarchy with tempaltes.
I am using filterCombos in the radgrid. Without filters, eveything works fine. But whenever I filter either the inbuilt filer or the filter combos, radgrid.rebind is called and then the toggle stops working. Any ideas ????
Protected Sub RadGrid1_PreRender(sender As Object, e As EventArgs) Handles RadGrid1.PreRender
Dim filterExp As String = RadGrid1.MasterTableView.FilterExpression.ToString()
If filterExp <> "" Then
filterExp = Replace(filterExp.ToUpper, "[", "")
filterExp = Replace(filterExp, "]", "")
RadGrid1.MasterTableView.DataSource = Nothing
RadGrid1.MasterTableView.Rebind()
End If
End Sub
Protected Sub RadGrid1_ItemCommand(sender As Object, e As GridCommandEventArgs) Handles RadGrid1.ItemCommand
If TypeOf e.Item Is GridCommandItem Then
If e.CommandName = "InitShowAll" Then
RadGrid1.MasterTableView.FilterExpression = String.Empty
For Each column As GridColumn In RadGrid1.MasterTableView.RenderColumns
If TypeOf column Is GridBoundColumn Then
Dim boundColumn As GridBoundColumn = TryCast(column, GridBoundColumn)
boundColumn.CurrentFilterValue = String.Empty
End If
Next
RadGrid1.MasterTableView.Rebind()
End If
End If
If e.CommandName = RadGrid.ExpandCollapseCommandName AndAlso TypeOf e.Item Is GridDataItem Then
DirectCast(e.Item, GridDataItem).ChildItem.FindControl("InnerContainer").Visible = Not e.Item.Expanded
End If
End Sub
Protected Sub RadGrid1_ItemCreated(sender As Object, e As GridItemEventArgs) Handles RadGrid1.ItemCreated
If TypeOf e.Item Is GridNestedViewItem Then
e.Item.FindControl("InnerContainer").Visible = DirectCast(e.Item, GridNestedViewItem).ParentItem.Expanded
End If
End Sub
Thanks