RadDock AutoPostBack problem in 2009.1.527.20

5 posts, 1 answers
  1. Oleg Yaroshevych
    Oleg Yaroshevych avatar
    21 posts
    Member since:
    Nov 2007

    Posted 05 Oct 2009 Link to this post

    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.
  2. Oleg Yaroshevych
    Oleg Yaroshevych avatar
    21 posts
    Member since:
    Nov 2007

    Posted 07 Oct 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Pero
    Admin
    Pero avatar
    1156 posts

    Posted 08 Oct 2009 Link to this post

    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.
  5. Oleg Yaroshevych
    Oleg Yaroshevych avatar
    21 posts
    Member since:
    Nov 2007

    Posted 08 Oct 2009 Link to this post

    Pero,

    Thanks for your feedback. EnableAnimation solved the issue.

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

    Best regards, Oleg Yaroshevych.
  6. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 08 Oct 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017