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

RadDock Closed, drag and other problems

7 Answers 157 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Benoit
Top achievements
Rank 1
Benoit asked on 21 Nov 2007, 08:30 PM
Hi!

I have some problems working with the RadDock with Prometheus. Here's an example of what I'm trying to do:

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <ajaxsettings> 
<telerik:AjaxSetting AjaxControlID="Button1"><updatedcontrols> 
<telerik:AjaxUpdatedControl ControlID="RadDock1"></telerik:AjaxUpdatedControl> 
<telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1"></telerik:AjaxUpdatedControl> 
</updatedcontrols> 
</telerik:AjaxSetting> 
</ajaxsettings> 
        </telerik:RadAjaxManager> 
         
         
        <telerik:RadDock ID="RadDock1" runat="server" Width="300px" Closed="True"  
            Height="300px" Title="Search"
        </telerik:RadDock> 
         
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" BorderWidth="1" runat="server" Height="100%" Width="100%"
            &nbsp;<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />     
             
        </telerik:RadAjaxPanel> 

The Button_Click action only does this : RadDock1.Closed = false;

What it does is it shows the RadDock object, but its not dragable and the action buttons (pin and close) arent working. Any ideas why? Any bypass?

Also, for this markup:
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <ajaxsettings> 
<telerik:AjaxSetting AjaxControlID="Button1"><updatedcontrols> 
<telerik:AjaxUpdatedControl ControlID="RadDock1"></telerik:AjaxUpdatedControl> 
<telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1"></telerik:AjaxUpdatedControl> 
</updatedcontrols> 
</telerik:AjaxSetting> 
</ajaxsettings> 
        </telerik:RadAjaxManager>              
         
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" BorderWidth="1" runat="server" Height="100%" Width="100%"
            &nbsp;<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />     
                    <telerik:RadDock ID="RadDock1" runat="server" Width="300px" Closed="True"  
            Height="300px" Title="Search"
        </telerik:RadDock> 
        </telerik:RadAjaxPanel> 

Again with the same action on Button_Click (RadDock1.Closed = false), when i press the button once, nothing happens. When i press a 2nd time, heres the result:

Execution error Microsoft JScript: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'RadDock1Panel'. If it is being updated dynamically then it must be inside another UpdatePanel.

Any ideas why? Any bypass?

Thank you!

7 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 26 Nov 2007, 11:51 AM
Hi Benoit,

The problem you experience is due to updating RadDock with AJAX and allowing the dock being dragged. In case you use the top property of the dock and set it to 100px, for example, and only press the button which updates it several times, you will see that the error you experience will not appear. However, when dragging the dock you move it in the DOM tree and this causes AJAX not working properly as it attempts to recreate the dock at the place it was previously located as well as the dock is moved at the new place and stays there. In this way two docks with the same with the same id exist on the page and this leads to an exception.

This is a common problem of controls which can be moved in the DOM tree or are created dynamically. As a workaround I suggest placing the dock inside a RadDockZone set the dock's property DockMode to "Docked"(which does not allow the dock being dragged outside the zone) and update the content of the whole zone with AJAX.

Please, let me know in case you need further assistance.

Best wishes,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Philippe
Top achievements
Rank 1
answered on 20 Dec 2007, 07:31 PM
Hi,

Somehow, in the regular ASP.NET suite, this problem wasn't present. We would really like to upgrade to Prometheus but without this fix there is no way we can switch.

Also, I have trouble understanding why is the dock moved someplace else in the dom? Shouldn't it always be at the same place but it's position set absolutely instead?

Being able to toggle the visibility on a floating dock through ajax should be possible in any RIA.

Thanks
0
Petio Petkov
Telerik team
answered on 03 Jan 2008, 02:42 PM
Hello Philippe,

In your scenario updating of single RadDockObject can "work", but RadDockingManager will not be notified and if you want to use other RadDock functionality then you could experience some unexpected problems. So you should create ajax only when the RadDockObject is docked to RadDockingZone. Also you should update all RadDockingZones and RadDockingManager on every ajax.

RadDock Prometheus
has the same requirements.

About your question for RadDock position:
    -     RadDock position is relative when RadDock is docked
    -     RadDock position is absolute when RadDock is floating

If you have any other questions please let us know.

All the best,
Petio Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Philippe
Top achievements
Rank 1
answered on 08 Jan 2008, 08:51 PM
Hello Petio,

After reading both replies, I still can't understand why a floating dock would be moved in the DOM tree when it is dragged. Are there any good reasons for this behavior?

Since a floating dock's position is absolute, would it be possible to move it back to it's initial place in the DOM tree after the dock is dragged so it can be updated properly after an AJAX requests?

Also, in your last reply, you mentioned that this scenario can "work", can you please elaborate on this?

Thanks in advance.

Philippe
0
Petio Petkov
Telerik team
answered on 16 Jan 2008, 03:16 PM
Hello Philippe,

When you start dragging the RadDock, it is attached to the form tag of the page. Using this approach we can get properly the left and top coordinates - otherwise the left and top coordinates will be relative to the initial RadDock parent.
We are currently searching for a way to provide the option to update floating RadDocks and we will do our best to provide such functionality for the next official release of RadControls Prometheus, which will appear in April. 



Sincerely yours,
Petio Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paul
Top achievements
Rank 1
answered on 19 Jun 2008, 09:11 PM
I would like to use RadDock for my popups, and AJAX them and controls within them, but am seeing wierd behavior similar to what was in this post.  Is there any reconciliation to this post?
0
Petio Petkov
Telerik team
answered on 23 Jun 2008, 03:55 PM
Hello Paul,

You can find my answer to your problem here:
http://www.telerik.com/community/forums/thread/b311D-beehme.aspx

All the best,
Petio Petkov
the Telerik team

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