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

Change Position of Modal Dialogue

2 Answers 170 Views
Window
This is a migrated thread and some comments may be shown as answers.
James Reategui
Top achievements
Rank 1
James Reategui asked on 30 Jul 2009, 09:20 PM
Modal Dialogues by your functionality always center on the window. In most cases, this makes sense and is the desired functionality. But sometimes we would like to be able to set the position of a Modal Dialogue.

In our case, it is when we have the radwindow modal inside of an iframe; we would prefer the position of the modal to be at the top of the iframe, but centered horizontally.

Is there currently a way to achieve this, without having conflicting client JS with the script that gets run to center the modal window?

Otherwise, feature request:  it would be nice that if the Top or Left properties are set, then the control would override the default auto-center functionality.

thanks,

2 Answers, 1 is accepted

Sort by
0
Accepted
Fiko
Telerik team
answered on 04 Aug 2009, 01:41 PM
Hello James,

In your case you could easily change the positions of the newly opened dialogs by using the following approach :

var oAlert = radalert("Some Text");  
oAlert.moveTo(100,100); 

This code will position  the radalert object on the desired position.

I hope this helps.

All the best,
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.
0
SUNIL
Top achievements
Rank 2
Iron
answered on 03 Mar 2014, 11:25 PM
This is an old post, but I though I would add a solution to display the alert just above the clicked button. Of course,  you need to include the jQuery.js file on your page for the code below to work.  The code will position the radalert just above the button with its left side  aligned with left side of button.

var pos =  $('#<%=btnSubmit.ClientID%>').offset();
var win =  radalert('<span style="font-size:medium;font-weight:bold;">Please input the minimum inventory  qauntity.</span>', 340, 180, 'Inventory', null, '');
win.moveTo(pos.left, pos.top -  20 - win.get_height());
Tags
Window
Asked by
James Reategui
Top achievements
Rank 1
Answers by
Fiko
Telerik team
SUNIL
Top achievements
Rank 2
Iron
Share this question
or