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

Can I disable ShowContentWhileDragging?

6 Answers 86 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Cameron Tabor
Top achievements
Rank 1
Cameron Tabor asked on 05 Sep 2007, 06:24 AM
"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.

6 Answers, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 05 Sep 2007, 02:03 PM
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
0
Cameron Tabor
Top achievements
Rank 1
answered on 05 Sep 2007, 02:22 PM
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.
0
Cameron Tabor
Top achievements
Rank 1
answered on 06 Sep 2007, 07:48 PM
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.
0
Petio Petkov
Telerik team
answered on 07 Sep 2007, 08:06 AM
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
0
Cameron Tabor
Top achievements
Rank 1
answered on 07 Sep 2007, 07:50 PM
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.

0
Petio Petkov
Telerik team
answered on 10 Sep 2007, 02:22 PM
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
Tags
Dock
Asked by
Cameron Tabor
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Cameron Tabor
Top achievements
Rank 1
Share this question
or