Radwindow position

3 posts, 0 answers
  1. Stefan
    Stefan avatar
    2 posts
    Member since:
    Nov 2013

    Posted 22 Jan 2015 Link to this post

    Hi !
    I have a radmenu in my masterpage that updates the content of the "mainarea"  with is an iFrame wrapped in a updatepanel.

    If I  use a radgrid and try to delete a item the confirmwindow is always displayed centered regarding to my iFrame.
    This is not very nice since the user cannot se the confimwindow if trying to delete an item far up or far down in the grid.
    I' thinking the user shouldn't have to scroll to find the window.

    If I use ConfirmDialogType="Classic" it works nice and the window is showing besides the selected row.
    If I use ConfirmDialogType="Radwindow"  outside the iFrame it also works nice .

    I would like the window to show up besides the area where I clicked or  centred in relation to the screen.

    Anyone nows how to solve this issue ?

  2. Marin Bratanov
    Marin Bratanov avatar
    3899 posts

    Posted 23 Jan 2015 Link to this post

    Hello Stefan,

    A RadConfirm dialog always shows up centered in the viewport it has available. When inside an iframe, the viewport is the iframe itself, so the RadConfirm should be in the center of the iframe regardless of its scrolling position.

    A common reason for a similar problem is either some CSS rule that affects absolute positioning in that page, or the element that is clicked being an anchor element with href=# which will scroll the current frame to the top as this is what such anchors are supposed to do in a browser.

    Here is a basic sample that seemed to work fine for me:
    <iframe src="Default2.aspx" style="height: 400px; width: 400px;"></iframe>
    and in Default2.aspx
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
    <div style="height: 300px; background: yellow;">spacer 1</div>
    <asp:Button ID="Button1" Text="call confirm dialog" OnClientClick="radconfirm('sure?'); return false;" runat="server" />
    <div style="height: 300px; background: green;">spacer 2</div>

    and I am attaching a screenshot with the expected result.

    Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. Stefan
    Stefan avatar
    2 posts
    Member since:
    Nov 2013

    Posted 23 Jan 2015 in reply to Marin Bratanov Link to this post

    Hi Marin !
    Thank's for your reply, I will look into my CSS settings.

Back to Top