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

Frameset and drag / drop problem

4 Answers 135 Views
Window
This is a migrated thread and some comments may be shown as answers.
Glenn
Top achievements
Rank 1
Glenn asked on 31 Aug 2011, 07:29 PM
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.

4 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 02 Sep 2011, 03:37 PM
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 >>

0
golddog
Top achievements
Rank 1
answered on 02 Nov 2011, 09:48 PM
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
0
golddog
Top achievements
Rank 1
answered on 02 Nov 2011, 09:48 PM
(Sorry for the repost--I got an error response page and hit it again, but the post obviously worked).
0
Marin Bratanov
Telerik team
answered on 03 Nov 2011, 12:26 PM
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
Tags
Window
Asked by
Glenn
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
golddog
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or