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

RadWindow not repositioning when setting offesets

2 Answers 40 Views
Window
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 30 Jul 2010, 09:59 PM
I'm using a RadWindow to display the View and Edit window for a record in a RadGrid row as the below code shows.  I'm trying to adjust the position of the RadWindow to be slightly above the default center of the screen by using the Top/Left attributes, but setting them doesn't seem to have any affect and the position of the RadWindow remains at center, I'm not sure what I'm doing wrong, any help is appreciated



        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" OnItemCreated="RadGrid1_ItemCreated"
            OnDeleteCommand="RadGrid1_DeleteCommand" GridLines="None" AllowSorting="True"
            Skin="Web20" PageSize="20" FooterStyle-Wrap="false">
            <MasterTableView EditFormSettings-PopUpSettings-Modal="True" EditMode="PopUp" DataSourceID="SqlDataSource1"
                AutoGenerateColumns="False" DataKeyNames="ID" ShowFooter="True" AllowPaging="True">
                <Columns>
                    <telerik:GridBoundColumn DataField="Date Submitted" DataType="System.DateTime" HeaderText="Date Submitted"
                        ReadOnly="True" SortExpression="Date Submitted" UniqueName="Date Submitted">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ReqCategory" HeaderText="ReqCategory" SortExpression="ReqCategory"
                        UniqueName="ReqCategory" Visible="False">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" SortExpression="Title"
                        UniqueName="Title">
                    </telerik:GridBoundColumn>
                    <%-- <telerik:GridBoundColumn DataField="Description" HeaderText="Description"
                        SortExpression="Description" UniqueName="Description">
                    </telerik:GridBoundColumn>--%>
                    <telerik:GridBoundColumn DataField="Owner" HeaderText="Owner" SortExpression="Owner"
                        UniqueName="Owner">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Requestor" HeaderText="Requestor" SortExpression="Requestor"
                        UniqueName="Requestor">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"
                        UniqueName="Status">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Requested Completion" HeaderText="Requested Completion"
                        SortExpression="Requested Completion" UniqueName="Requested Completion">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Estimated Completion" HeaderText="Estimated Completion"
                        SortExpression="Estimated Completion" UniqueName="Estimated Completion">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Ticket Submitted By" HeaderText="Ticket Submitted By"
                        SortExpression="Ticket Submitted By" UniqueName="Ticket Submitted By">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="View Ticket" UniqueName="TemplateViewColumn">
                        <ItemTemplate>
                            <asp:HyperLink ID="ViewLink" runat="server" Text="View"></asp:HyperLink>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Edit Ticket" UniqueName="TemplateEditColumn">
                        <ItemTemplate>
                            <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridButtonColumn HeaderText="Drop Ticket" Text="Drop" CommandName="Delete"
                        UniqueName="Drop" ConfirmText="Are you sure you want to drop this ticket?" ConfirmTitle="Drop Ticket"                 ConfirmDialogType="RadWindow">
                    </telerik:GridButtonColumn>
                </Columns>
                <EditFormSettings>
                    <PopUpSettings Modal="True"></PopUpSettings>
                </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>


        <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
              Behaviors="Close" InitialBehaviors="None" >
            <Windows>
                <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" Height="500px"
                    Width="550px" ReloadOnShow="true" ShowContentDuringLoad="false"
                    Modal="true" VisibleStatusbar="False" Top="200px" Left="174px" />
            </Windows>
        </telerik:RadWindowManager>


PS; Forgive me for not formatting the code above, the code got pretty messy when I was trying to format it and so I left it as is to make it, hopefully, easier to read.

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 03 Aug 2010, 12:50 PM
Hello Richard,

A modal RadWindow will always be shown in the center of the screen. If you want to change its position, you can use its client-side API (moveTo()) after the window is shown.

All the best,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Richard
Top achievements
Rank 1
answered on 03 Aug 2010, 05:11 PM
Thanks Georgi, decided to not worry about repositioning, but that is good to know for next time.
Tags
Window
Asked by
Richard
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Richard
Top achievements
Rank 1
Share this question
or