Hi, I'm new to working with RadDocks and have some questions (probably pretty basic ones).
My RadDocks are dynamically generated by a Button_Click event, and then recreated in the Page_Init event on each PostBack. In RadDock1_SaveDockLayout I have:
CurrentDockStates = RadDockLayout1.GetRegisteredDocksState();
In Page_Init I call the ApplyState method of each RadDock and pass it the appropriate element in CurrentDockStates. Then I add the RadDocks to RadDockLayout1's Controls.
Everything seems to work pretty well, but I'm not sure I'm understanding why it works.
(1) If I look at the info in CurrentDockStates, it's the info I saved at the end of the previous PostBack (as it should be, since that's when I saved it). But I've moved the RadDock since then. (That is, it's been manually dragged from one DockZone to another by the client.) And yet, it loads (correctly) in the position I moved it to. So I guess there's some hidden code built into the RadDock controls that updates their position. But if so, why is it necessary to call ApplyState at all? I mean, if the control has more up to date info already than the info I'm passing to ApplyState.
(2) The example on dynamically generated RadDocks also had some code in RadDockLayout1_LoadDockLayout to update the Positions and Indices of the RadDocks. But even if I leave this code out, my RadDocks seem to still be showing up in the right place on PostBack. Is the LoadDockLayout code only necessary if I were loading their positions from a file (e.g. a database)? And why would that be necessary when I'm already calling ApplyState?
(3) The one thing that isn't working right is closing the RadDocks. I can close them, but they reappear as soon as I have a PostBack. How can I fix this?
Thanks in advance for answering these questions
My RadDocks are dynamically generated by a Button_Click event, and then recreated in the Page_Init event on each PostBack. In RadDock1_SaveDockLayout I have:
CurrentDockStates = RadDockLayout1.GetRegisteredDocksState();
In Page_Init I call the ApplyState method of each RadDock and pass it the appropriate element in CurrentDockStates. Then I add the RadDocks to RadDockLayout1's Controls.
Everything seems to work pretty well, but I'm not sure I'm understanding why it works.
(1) If I look at the info in CurrentDockStates, it's the info I saved at the end of the previous PostBack (as it should be, since that's when I saved it). But I've moved the RadDock since then. (That is, it's been manually dragged from one DockZone to another by the client.) And yet, it loads (correctly) in the position I moved it to. So I guess there's some hidden code built into the RadDock controls that updates their position. But if so, why is it necessary to call ApplyState at all? I mean, if the control has more up to date info already than the info I'm passing to ApplyState.
(2) The example on dynamically generated RadDocks also had some code in RadDockLayout1_LoadDockLayout to update the Positions and Indices of the RadDocks. But even if I leave this code out, my RadDocks seem to still be showing up in the right place on PostBack. Is the LoadDockLayout code only necessary if I were loading their positions from a file (e.g. a database)? And why would that be necessary when I'm already calling ApplyState?
(3) The one thing that isn't working right is closing the RadDocks. I can close them, but they reappear as soon as I have a PostBack. How can I fix this?
Thanks in advance for answering these questions