Radwindow resize linked to radsplitterbar

3 posts, 1 answers
  1. magdil
    magdil avatar
    6 posts
    Member since:
    Jul 2011

    Posted 14 Oct 2011 Link to this post


    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?

  2. Answer
    Marin Bratanov
    Marin Bratanov avatar
    4609 posts

    Posted 18 Oct 2011 Link to this post

    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,
    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
  3. magdil
    magdil avatar
    6 posts
    Member since:
    Jul 2011

    Posted 19 Oct 2011 Link to this post

    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.
Back to Top