Frameset and drag / drop problem

5 posts, 0 answers
  1. Glenn
    Glenn avatar
    1 posts
    Member since:
    Dec 2010

    Posted 31 Aug 2011 Link to this post

    Hello,

    I have an ASP.NET application that uses a frameset (header frame, left-menu frame, and then content frame).  I've searched for frame related posts and have found a few talking about the fact other frames don't disable, how to render above the frameset, etc, but none for this issue.

    The behavior is this:

    * Open a RadWindow (in this case, a modal dialog) in the content frame
    * Left-click and hold the title bar and start dragging around.  
    * While dragging, move your cursor to another frame in the frameset.  You'll note that the window stays in the content frame (good)
    * While still in the other frame, release the mouse button.
    * Move the cursor back over the content frame.  Once you do, the radwindow will snap to the cursor position, and follow the cursor - even though the mousebutton is not being held.  To "release" you have to left- click on the window again.

    This issue is frustrating for a client; what they would like to see is the window is "released" as soon as the mouse is released.  I suspect the combination of a frameset and browser capabilities may make this impossible - perhaps the browser is still firing the ondrag...   But I'd love to know if there's a workaround.
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 02 Sep 2011 Link to this post

    Hi Glenn,

     The problem comes from the fact that when the mouse goes over the adjacent frame that's another document and it consumes the mouse events. As a result the document with the RadWindow is not informed that the mouse was released. This problem when dealing with frames and events is a common one and it is not directly related to RadWindow or RadControls but to browser behavior and how things work. Possible solutions could be to create a transparent overlay and show it when needed above the adjacent frames or to hide them. The first approach will be pretty complex for your case and the second one will cause undesired disappearance of frames. That is why I tried to prepare some sort of custom workaround for you which uses restriction zone and some private methods. Please, test it and fine tune it if needed.

    Kind regards,
    Svetlina
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. golddog
    golddog avatar
    69 posts
    Member since:
    Jun 2007

    Posted 02 Nov 2011 Link to this post

    Hey guys, I'm trying to implement the code which Svetlana shows.  Unfortunately for us, we don't have a RadWindow anywhere in markup on which we can set these attributes.

    We do more like this example, where we just use a radopen in javascript to get a reference to the window object.  However, I don't see a way to set OnClientDragStart function in the client-side API.  I've fooled around trying some things without luck so far.

    I did see the set_RestrictionZoneID attribute and got that working, it's just down to the js to extend the mouseup.

    Can anyone tell me if this is possible and, if so, how to set this in javascript?

    Thanks,

    Scott
  4. golddog
    golddog avatar
    69 posts
    Member since:
    Jun 2007

    Posted 02 Nov 2011 Link to this post

    (Sorry for the repost--I got an error response page and hit it again, but the post obviously worked).
  5. Marin Bratanov
    Admin
    Marin Bratanov avatar
    4609 posts

    Posted 03 Nov 2011 Link to this post

    Hello Scott,

    The link is to the documentation for the old, "Classic" version of the RadControls and is no longer accurate as this is about the RadControls for ASP.NET AJAX. The correct client-side API reference can be found here: http://www.telerik.com/help/aspnet-ajax/window-programming-radwindow-methods.html. You will also find helpftul this help article on attaching event handlers dynamically: http://www.telerik.com/help/aspnet-ajax/window-programming-setting-client-events-using-javascript.html. The method you are looking for is add_dragStart().


    Greetings,
    Marin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top