Can I disable ShowContentWhileDragging?

7 posts, 0 answers
  1. Cameron Tabor
    Cameron Tabor avatar
    9 posts
    Member since:
    Mar 2004

    Posted 05 Sep 2007 Link to this post

    "ShowContentWhileDragging=false" on the docking manager was a nice feature of the other version of RadDock.  I have a RadEditor in the dock object and the performace of changing the docking zone was dramatically improved when I was able to set ShowContentWhileDragging to false.  Is there any way to achieve this behavior in "Prometheus"?

    Thanks.
  2. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 05 Sep 2007 Link to this post

    Hi Cameron Tabor,

    This feature is not implemented in RadDock Prometheus and we do not have plans to implemented it.
    You can use RadDock's client event OnClientDragStart to change the content while dragging, and
    OnClientDragEnd to return the old content using javascript.

    For example :
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="rad" %>    
    <!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>Untitled Page</title> 
        <script type="text/javascript">  
        var oldcontainer;  
        var oldbackground;  
        function OnClientDragStart(obj,args)  
        {      
          var container = obj._contentContainer;  
          oldcontainer = container.innerHTML;  
          oldbackground = container.style.backgroundColor;  
          container.innerHTML="";  
          container.style.backgroundColor = "Orange";  
        }  
        function OnClientDragEnd(obj,args)  
        {  
          var container = obj._contentContainer;  
          container.innerHTML=oldcontainer;  
          container.style.backgroundColor = oldbackground;      
        }   
        </script> 
    </head> 
    <body> 
        <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
        <div> 
         <rad:RadDockLayout ID="RadDockLayout1" runat="server">  
            <rad:RadDockZone ID="RadDockZone1" runat="server">  
                <rad:RadDock ID="RadDock1" runat="server" Title="RadDock1" 
                    OnClientDragStart="OnClientDragStart" 
                    OnClientDragEnd="OnClientDragEnd" 
                > 
                <ContentTemplate> 
                    SomeText                  
                </ContentTemplate> 
                </rad:RadDock> 
            </rad:RadDockZone> 
            <rad:RadDockZone ID="RadDockZone2" runat="server">  
              
            </rad:RadDockZone> 
           
         </rad:RadDockLayout> 
        </div> 
        </form> 
    </body> 
    </html> 

    I hope that this will help you.

    Sincerely yours,
    Petio Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Cameron Tabor
    Cameron Tabor avatar
    9 posts
    Member since:
    Mar 2004

    Posted 05 Sep 2007 Link to this post

    Thanks for the sample code.  I was thinking something like that would work, I guess I was just hoping for built in functionality for it.  May I ask why that feature was dropped?  It seems like it would have global appeal to those who put complex controls in a dock and suffer a performance hit from the browser.

    Thanks again.
  4. Cameron Tabor
    Cameron Tabor avatar
    9 posts
    Member since:
    Mar 2004

    Posted 06 Sep 2007 Link to this post

    I implemented this, but I'm still having performance issues, meaning when I drag the dock around, it is lagging behind the cursor and very choppy.  However, the telerik demo runs perfectly.  This must be something specific to my setup.  I have even taken the editor out of the dock to eliminate that as the problem.  So I have relatively empty docks that are behaving very slowly. 

    Are there any known best practices or things to look out for that can cause performance problems on even relatively empty docks?  Maybe using divs instead of tables in my main page?  Any ideas?

    Thanks.
  5. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 07 Sep 2007 Link to this post

    Hello Cameron Tabor,

    Please set debug="false" in your Web.config file. I hope that this will help you. 

    Sincerely yours,
    Petio Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Cameron Tabor
    Cameron Tabor avatar
    9 posts
    Member since:
    Mar 2004

    Posted 07 Sep 2007 Link to this post

    That worked great!  This is a huge item that should be documented well, maybe it is and I missed it. 

    By the way, why does this affect anything? The debug=true to my knowledge only affects whether the aspx is compiled with debug symbols, I wouldn't expect it to change anything about client script behavior.

  7. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 10 Sep 2007 Link to this post

    Hi Cameron,

    The RadDock Prometheus control is built on top of ASP.NET AJAX.When debugging is enabled, ASP.NET AJAX uses a debug version of the client libraries.
    Some information which may be helpful for you ,you can find on the following links:
    http://www.asp.net/ajax/documentation/live/overview/ASPNETAJAXDebuggingAndTracingOverview.aspx,
    and
    http://weblogs.asp.net/scottgu/archive/2006/04/11/Don_1920_t-run-production-ASP.NET-Applications-with-debug_3D001D20_true_1D20_-enabled.aspx

    If you have any other questions please let us know.

    Greetings,
    Petio Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top