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

RadDock AutoPostBack problem in 2009.1.527.20

4 Answers 45 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Oleg Yaroshevych
Top achievements
Rank 1
Oleg Yaroshevych asked on 05 Oct 2009, 04:36 PM
Hello,

I've upgraded from 2009.1.311.35 to 2009.1.527.20 and found problem that broke some of my functionality: automatic post back on dock close does not work in RadDock anymore.

You can use following code to reproduce the problem, compile it with version 2009.1.311.35 and 2009.1.527.20 and you'll see the difference, close the dock and check if postback was issued.

<body> 
  <form id="form1" runat="server"
  <div> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" ScriptMode="Debug"
    </telerik:RadScriptManager> 
    <telerik:RadDockLayout ID="RadDockLayout1" runat="server"
      <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"
        <telerik:RadDock ID="RadDock1" runat="server" Width="300px" CommandsAutoPostBack="true" 
          AutoPostBack="true"
          <Commands> 
            <telerik:DockCloseCommand AutoPostBack="true" /> 
          </Commands> 
          <ContentTemplate> 
            test 
          </ContentTemplate> 
        </telerik:RadDock> 
      </telerik:RadDockZone> 
    </telerik:RadDockLayout> 
  </div> 
  </form> 
</body> 

My configuration:
  • Telerik For ASP.NET AJAX 2009.1.527.20 and 2009.1.311.35
  • Windows XP Pro SP3
  • Visual Studio 2008
  • FF 3.5,3, IE 7.0

Best regards, Oleg Yaroshevych.

4 Answers, 1 is accepted

Sort by
0
Oleg Yaroshevych
Top achievements
Rank 1
answered on 07 Oct 2009, 12:43 PM
Telerik Team, any feedback? I can provide complete test projects with binaries to compare behavior in 2009.1.311.35 and 2009.1.527.20.

Best regards, Oleg Yaroshevych.
0
Accepted
Pero
Telerik team
answered on 08 Oct 2009, 08:20 AM
Hello Oleg,

This problem is related to the RadDock control and exists specifically in the version that you are currently using 2009.1. 527. This problem is fixed and if you want you can download the latest version of our control suite and you would not have any problems.

The problem comes from the fact that when the EnableAnimation property of the RadDock is set to false (by default it is false) the event for the close command is not fired. This causes the dock not to perform a postback even though it has AutoPostBack="true". You have the following options:

1. Set EnableAnimation="true";

2. Download the latest DLL where the problem does not exist.

3. Workaround this problem by using the following code:

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <div> 
        <asp:ScriptManager ID="RadScriptManager1" runat="server" ScriptMode="Debug"
        </asp:ScriptManager> 
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server"
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"
                <telerik:RadDock ID="RadDock1" runat="server" Width="300px" CommandsAutoPostBack="true" 
                    AutoPostBack="true"
                    <Commands> 
                        <telerik:DockCloseCommand AutoPostBack="true" /> 
                    </Commands> 
                    <ContentTemplate> 
                        test 
                    </ContentTemplate> 
                </telerik:RadDock> 
            </telerik:RadDockZone> 
        </telerik:RadDockLayout> 
 
        <script type="text/javascript"
        //FIX the problem when dock is without animation.   
        var old_SetClosed = Telerik.Web.UI.RadDock.prototype.set_closed; 
        Telerik.Web.UI.RadDock.prototype.set_closed = function(value, playAnimation) 
        { 
            if (value == true) 
            { 
                this._closed = value
                var element = this.get_element(); 
                element.style.display = "none"
                this.updateClientState(); 
                Telerik.Web.UI.DockCloseCommand.callBaseMethod(this.getCommand("Close"), 'onCommand'); 
            } 
            else 
            { 
                old_SetClosed(value, playAnimation); 
            } 
        }   
        </script> 
 
    </div> 
    </form> 
</body> 
</html> 
 


Sincerely yours,
Pero
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Oleg Yaroshevych
Top achievements
Rank 1
answered on 08 Oct 2009, 12:40 PM
Pero,

Thanks for your feedback. EnableAnimation solved the issue.

Can I control animation effects like fade, resize, etc?

Best regards, Oleg Yaroshevych.
0
Pero
Telerik team
answered on 08 Oct 2009, 12:51 PM
Hi Oleg,

You can only enable or disable animations. You cannot control the animation effects.

Kind regards,
Pero
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Dock
Asked by
Oleg Yaroshevych
Top achievements
Rank 1
Answers by
Oleg Yaroshevych
Top achievements
Rank 1
Pero
Telerik team
Share this question
or