RadWindows Tile Property and Overlaps

7 posts, 0 answers
  1. Arindam
    Arindam avatar
    28 posts
    Member since:
    Mar 2009

    Posted 08 Jul 2009 Link to this post

    Hello Friends -

    I am having two problems with Telerik Rad-Windows, please help me where I am going wrong:-

    1. Tile Window Property is not working in correct way. I had used the below script -

    <asp:ImageButton ID="ImgBtnTile" runat="server" AlternateText="Tile" OnClientClick="GetRadWindowManager().tile();return false;" ImageUrl="~/images/icons/tile.gif"/>

    Above code is placed in Master Page and in Content Page I am having the Rad-Windows, but the windows are not properly tiled.
    I guessed it should be working exactly same as Tile Windows Vertically/Horizontally property of Windows OS. Please let me know how I can get the functionality correctly done.

    2. I am dragging Rad-Windows from a tree-view and dropping it in a div, what I want to do I need to stop overlapping i.e when I dragged one window say RadWindow1 which is showing me http://www.rediffmail.com and I dragged another window say RadWindow2 which is showing me http://www.google.com and when I dropped the second window in div and placed it over the first window then the first or second window will automatically adjust and two windows won't be overlapped. can I have this functionality working?

    Please suggest me a possible way to get the above functionality done!

    Thanks
    Arindam R

  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 10 Jul 2009 Link to this post

    Hello Arindam,

    In reference to the questions :
    • I am not quite sure but I think that you point the RadWindows' overlapping when the windows are tilled. This behavior occurs when the sum of the windows buttons' width is greater than the width of the browser window. Please note that this behavior cannot be overridden because the RadWindow control cannot shrink its width to a smaller size than the buttons on the top-left corner.
    • Your scenario can be covered but this is a common programming task and you need to implement it yourself. For your convenience I will point the event and the functions related to the RadWindow control that you can use in order to achieve the desired result :
      - OnClientDragEnd - this event is fired when the mouse button is dropped
      getWindowBounds() - Returns the current size and position of the RadWindow
      - moveTo(x, y) - moves the window's client-side object to the specified position

    I hope this helps.

    Sincerely yours,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Valery
    Valery avatar
    45 posts
    Member since:
    Nov 2008

    Posted 08 Jan 2010 Link to this post

    I have a r.a.d. window and I am trying to save its position after dragging. Unfortunately it seems like getWindowBounds() returns its position before dragging...
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 Jan 2010 Link to this post

    Hi Valery,

    Try calling getWindowBounds() with a small timeout - even a timeout of 0ms should do the trick:
    function OnClientDragEnd(sender, args)
    {
        window.setTimeout(function()
        {
            var bounds = sender.getWindowBounds();
            alert(bounds.x + "    " + bounds.y);
        }, 0);
    }


    All the best,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Valery
    Valery avatar
    45 posts
    Member since:
    Nov 2008

    Posted 13 Jan 2010 Link to this post

    Привет, Georgi,

    Thank you for the solution you have provided. It worked! However such a behavior is kind of weird...

    Best regards,
    Valery.
  7. Raphael
    Raphael avatar
    1 posts
    Member since:
    Jul 2010

    Posted 14 Jul 2010 Link to this post

    Georgi,

    I agree: it is wierd.
  8. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 16 Jul 2010 Link to this post

    Hi guys,

    I can agree that the logic can be a bit confusing. It is kept for backward compatibility and of course if we find a way to change it without affecting other functionality that depend on it, we will do that.
    If you don't want to use a timeout in your calculations, I would suggest to check the approach used in the attached file. There we are using Telerik's static client library for getting the needed size and position.


    All the best,
    Georgi Tunev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017