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

Radwindow position

2 Answers 122 Views
Window
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Stefan asked on 22 Jan 2015, 05:19 PM
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 ?

Regards
Stefan

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 Jan 2015, 09:28 AM
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.

Regards,
Marin Bratanov
Telerik
 

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.

 
0
Stefan
Top achievements
Rank 1
answered on 23 Jan 2015, 10:34 AM
Hi Marin !
Thank's for your reply, I will look into my CSS settings.

Regards
Stefan
Tags
Window
Asked by
Stefan
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Stefan
Top achievements
Rank 1
Share this question
or