Posted 08 May 2007
Link to this post
As can be seen with my previous posts on problems I am having with the Docking controls, I decided, perhaps the simplest thing would be to step back from the application I'm building and create a test application.
The first thing I did, was following the documentation, I created a simple page with a RadDockLayout, A RadDockZone, and a single button. In the code behind, I took the code strait out of the documentation for creating dynamic docks. I create a dock dynamically and add it to the RadDockZone.
I ran this simple test page and clicking the button adds a new dock, dynamically created, to my DockZone. Yay! That part works great.
Now, taking it a step further, all I added was a RadAjaxManager and using the designer, hooked up the button as a firing control and the RadDockLayout and RadDockZone as the targets.
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<telerik:AjaxUpdatedControl ControlID="RadDockLayout1" />
<telerik:AjaxUpdatedControl ControlID="RadDockZone1" />
Error: Object expected
So....it appears my issues have nothing to do with my application and there is some fundamental problem with using the AjaxManager to "Ajaxify" and event which dynamically creates a Dock.
Now, what's interesting is if I click the button a couple of times, creating some docks, the error doesn't stop Docks from being created, they just come in "broken." If I then however click the refresh button on my browser, the docks I created are there, there is no error on the page, and I can move the docks and the controls in the titlebar work.
So it seems that in order for a Dock to work correctly it has to be registered during a full page cycle (The Page_Init has to be called) and as far as I can tell there is no intuitive way to Ajaxify the dynamic creation of RadDocks.
I do hope I am wrong, and if so, please guide me to what I need to change in order for this to work as expected.