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

Radwindow resize linked to radsplitterbar

2 Answers 59 Views
Window
This is a migrated thread and some comments may be shown as answers.
magdil
Top achievements
Rank 1
magdil asked on 14 Oct 2011, 11:52 AM
Hi,

I have got a radSplitter, consisting of two radpane controls and a vertical splitterbar to seperate the two panes.
The left pane is empty, but the right pane contains a radwindow (that has RestrictionZoneID set to the right pane's ID).

When I try to resize the panes by dragging the radsplitterbar to the left everything is working fine. However if I try to resize the panes by draggin the radsplitterbar to the right it seems as if the splitterbar can not go past the radwindow. The radwindow kind of "obstructs" the radsplitterbar's movement.

Any ideas how to get around this, and have the radwindow resize with the panel when the splitterbar moves to the right?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 18 Oct 2011, 01:51 PM
Hi Magdil,

What I believe is happening in your scenario is that the iframe, which the RadWindow uses to load your external content, consumes the mouse events and thus the parent page does not know you are moving the mouse with the intent to drag the RadSplitBar: http://screencast.com/t/Ok4QOHEGA. If so - this is the way iframes work and there isn't much that can be done.

Please note that resizing the restriction zone so that the RadWindow it outside of it is an invalid scenario - the concept is that the restriction zone is the static element and the RadWIndow sets its coordinates according this element. If these coordinates change we generally have no way of knowing this.

Nevertheless I created and attached a simple page which moves the RadWindow in the restriction zone if needed. If the splitter's orientation changes this would requrie some changes in the code, yet the general logic stays the same.

The important concept is the usage of the additional div that overlays the iframe of the RadWindow so that it does not consume the events. The rest is the logic for repositioning the RadWindow.

Please examine the recording with the expected behavior: http://screencast.com/t/x56rlMpDjdQE. If there is enough room in the restriction zone the RadWindow is correctly moved to the right. I chose to persist its vertical position and move it to the beginning of the zone. You can further extend this logic if needed.


Best wishes,
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
0
magdil
Top achievements
Rank 1
answered on 19 Oct 2011, 08:31 AM
Thank you very much Marin. This is exactly what I needed.
I will need to expand your solution a bit to get it working exactly as I want it to, but this has pointed me in the right direction.
Tags
Window
Asked by
magdil
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
magdil
Top achievements
Rank 1
Share this question
or