This is a migrated thread and some comments may be shown as answers.

Simple Dock with Ajax Problem

1 Answer 148 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Alex Peachey
Top achievements
Rank 1
Alex Peachey asked on 08 May 2007, 08:39 PM
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">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="Button1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadDockLayout1" />
                        <telerik:AjaxUpdatedControl ControlID="RadDockZone1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

Now, when I run the page and click the button, there is no postback and a Dock appears in the DockZone. Yay ... er ... wait, no. Not Yay, because the Dock is broken. It can't be moved, the controls in the titlebar don't work, and I notice there is a Javascript Error on the page. I open up the error to take a peak and see:

Line: 6
Char: 31345
Error: Object expected
Code: 0
URL: http://localhost:3521/TelerikDockTest/Default.aspx.


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.

1 Answer, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 10 May 2007, 04:06 PM
Hello Alex Peachey,

We attached a test version to the following thread where this issue must be fixed.
http://www.telerik.com/community/forums/thread/b311D-mccag.aspx
Official update will be avaible on 21 May

Greetings,
Petio Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Dock
Asked by
Alex Peachey
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question
or