OnClientDragStart...with AutoPostBack=true

4 posts, 0 answers
  1. JQ
    JQ avatar
    13 posts
    Member since:
    Aug 2007

    Posted 06 Sep 2007 Link to this post

    Hi
    I have UpdatePanel, RadDocks, RadDockZones, and RadDockLayout created dynamically. All the Docks are set AutoPostBack=true, and they are outside the UpdatePanel but UpdatePanel is configured to conditionally ajaxify the docks.

    I have developed a portal where, in design mode, you can move around the contents and the layout is saved automatically.

    Now I added a new feature, where the content is hidden while being dragged.

    I made use of the following javascript code,
    var oldcontainer;   
    var oldbackground;   
    function RadDockOnDragStart(dock,args){ 
        var container = dock._element; 
        oldcontainer = container.innerHTML;   
        oldbackground = container.style.backgroundColor;   
        container.innerHTML='';   
        container.style.backgroundColor = 'Orange';   
    function RadDockOnDragEnd(dock,args){ 
        var container = dock._element;   
        container.innerHTML=oldcontainer;   
        container.style.backgroundColor = oldbackground;     

    of course the OnClientDragStart and OnClientDragEnd are set to those functions.

    The problem is that this works only once for each of the docks. When I start the drag, the dock becomes Orange panel, and when I drop it, it restores the original content. However, that dock can no longer be dragged... and the post back didn't seem to occur because when I refresh the page by pressing F5, the layout has not been saved.

    What's wrong with the javascript?
  2. JQ
    JQ avatar
    13 posts
    Member since:
    Aug 2007

    Posted 06 Sep 2007 Link to this post

    I need a way to hide/substitute the content of the Dock while dragging...
    Because some of the controls I'm adding to my docks are quite complicated and dragging is unacceptably slow.
  3. Cameron Tabor
    Cameron Tabor avatar
    9 posts
    Member since:
    Mar 2004

    Posted 06 Sep 2007 Link to this post

    I'm having a similar problem  with the dragging being slow.  When I replaced the content with the orange panel, it still didn't improve the performance.  My problem seems to be more global even.  When I just put a few lines of text in the dock, it is still slow.  I'll be interested in knowing if anyone else has experienced/fixed this.

    The Telerik demo site works great however.  I am going to try an write a sample app to isolate what is going on.
  4. Cameron Tabor
    Cameron Tabor avatar
    9 posts
    Member since:
    Mar 2004

    Posted 07 Sep 2007 Link to this post

    FYI, setting debug="false" in the compilation element of the web.config helped the performance for me tremendously.   Even though I was skeptical and can't imagine what that would have to do with client script code.   Here is the thread where it is recommended.

    http://www.telerik.com/community/forums/thread/b311D-httch.aspx

    -Cameron
Back to Top