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

Adjusting the Position of a RadWindow

2 Answers 70 Views
Window
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 17 Aug 2013, 06:12 PM
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 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 19 Aug 2013, 03:42 AM
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.
0
Robert
Top achievements
Rank 1
answered on 19 Aug 2013, 09:33 PM
Thank you!
Tags
Window
Asked by
Robert
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Robert
Top achievements
Rank 1
Share this question
or