Adjusting the Position of a RadWindow

3 posts, 1 answers
  1. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 17 Aug 2013 Link to this post

    As the attached screenshot shows, I've successfully employed multiple RadWindows in my ASP.NET 4.0 app.  Functionally they work really well.  However, do you notice that the little "Add New Stockpile" dialog box is shifted all the way over to the left of its "parent" RadWindow.  This looks a bit peculiar.

    Is there a way for me to shift the initial position over to the right?  I played around with "OffsetElementID" but it didn't seem to do anything.

    Robert
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Aug 2013 Link to this post

    Hi Robert,

    You can use MoveTo function to set the position for a RadWindow.Please have a look to the following Code Snippet.

    ASPX:
    <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true">
        <ContentTemplate>
            <telerik:RadButton ID="RadButton1" runat="server" Text="Click" OnClientClicked="setposition"
                AutoPostBack="false">
            </telerik:RadButton>
            <telerik:RadWindow ID="RadWindow2" runat="server">
                <ContentTemplate>
                    <telerik:RadButton ID="RadButton2" runat="server" Text="Ok">
                    </telerik:RadButton>
                </ContentTemplate>
            </telerik:RadWindow>
        </ContentTemplate>
    </telerik:RadWindow>

    JavaScript:
    <script type="text/javascript">
        function setposition(sender, args) {
            var radwindow = $find("<%=RadWindow2.ClientID%>");
            radwindow.MoveTo(700, 250); // You can set the position here
            radwindow.setActive(true);
        }
    </script>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 19 Aug 2013 Link to this post

    Thank you!
Back to Top