Change Position of Modal Dialogue

3 posts, 1 answers
  1. James Reategui
    James Reategui avatar
    12 posts
    Member since:
    Oct 2008

    Posted 30 Jul 2009 Link to this post

    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.

  2. Answer
    Fiko avatar
    1406 posts

    Posted 04 Aug 2009 Link to this post

    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");  

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

    I hope this helps.

    All the best,
    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. DevCraft R3 2016 release webinar banner
  4. Sunil
    Sunil avatar
    224 posts
    Member since:
    Jan 2004

    Posted 03 Mar 2014 Link to this post

    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, -  20 - win.get_height());
Back to Top