Hello,
I've built a "portal" interface, combining dynamic TabStrip and RadDockLayout/Zone/Dock controls, fed from a database.
When the user clicks on a different tab, I want to show a different set of docks. On the postback, though, the docks from the soon-to-be-previous tab are still in viewstate and get reattached to their Zones. I added a method to clear them:
The .Clear() method isn't working. It just plain doesn't clear the Zone. The Docks are still there, before and after the .Clear() call.
I changed to the (commented out) .Closed = True option, but that seems slow and klunky to me.
a) is there a reason that .Clear() wouldn't work? I do realize I'm using a readonly collection to access them, but RegisteredZones only returns readonly.
b) is there a better way of clearing all the Docks in a Layout?
Thanks!
I've built a "portal" interface, combining dynamic TabStrip and RadDockLayout/Zone/Dock controls, fed from a database.
When the user clicks on a different tab, I want to show a different set of docks. On the postback, though, the docks from the soon-to-be-previous tab are still in viewstate and get reattached to their Zones. I added a method to clear them:
''' <summary> |
''' Clear all docks from a given raddocklayout |
''' </summary> |
''' <param name="rdLayout">given raddocklayout</param> |
''' <remarks></remarks> |
Public Sub ClearAllDocks(ByVal rdLayout As RadDockLayout) |
Dim rdZones As ReadOnlyCollection(Of RadDockZone) = rdLayout.RegisteredZones() |
For Each rdZone As RadDockZone In rdZones |
rdZone.Docks.Clear() |
'For Each rdDock As RadDock In rdZone.Docks() |
' rdDock.Closed = True |
'Next |
Next |
End Sub |
The .Clear() method isn't working. It just plain doesn't clear the Zone. The Docks are still there, before and after the .Clear() call.
I changed to the (commented out) .Closed = True option, but that seems slow and klunky to me.
a) is there a reason that .Clear() wouldn't work? I do realize I'm using a readonly collection to access them, but RegisteredZones only returns readonly.
b) is there a better way of clearing all the Docks in a Layout?
Thanks!