Hi,
I have a content page (its master page has rather simple html) which has a RadGrid with window editing. I followed examples and manual pages but I cannot position my window correctly, it always displays centered.
OffsetElement is a simple DIV on top of the content page. The window is called to display with:
and the script that actually opens the window is (cut&pasted directly from example sources):
no way, the window is always centered.
Any clue?
Lorenzo
I have a content page (its master page has rather simple html) which has a RadGrid with window editing. I followed examples and manual pages but I cannot position my window correctly, it always displays centered.
| <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Web20"> |
| <Windows> |
| <telerik:RadWindow ID="EditDialogWnd" runat="server" Title="Edit" ShowContentDuringLoad="false" |
| ReloadOnShow="true" Modal="true" Width="400" Height="400" OffsetElementID="OffsetElement" Top="0" Left="0"/> |
| </Windows> |
| </telerik:RadWindowManager> |
OffsetElement is a simple DIV on top of the content page. The window is called to display with:
| <CommandItemTemplate> |
| <div style="padding:10px 0px;"> |
| <asp:LinkButton ID="HlInsertNew" runat="server" OnClientClick="ShowInsertForm('EditFormSA.aspx?type=cliente'); return false;"><img style="border:0px;vertical-align:middle;" alt="" src="images/AddRecord.gif" /> Inserisci Nuovo</asp:LinkButton> |
| </div> |
| </CommandItemTemplate> |
and the script that actually opens the window is (cut&pasted directly from example sources):
| <Telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
| <script type="text/javascript"> |
| function ShowEditForm(id, rowIndex, editFormUrl) |
| { |
| var grid = $find("<%= RadGrid1.ClientID %>"); |
| var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element(); |
| grid.get_masterTableView().selectItem(rowControl, true); |
| //window.radopen("EditFormCS.aspx?EmployeeID=" + id, "UserListDialog"); |
| window.radopen(editFormUrl, "EditDialogWnd"); |
| return false; |
| } |
| function ShowInsertForm(editFormUrl) |
| { |
| window.radopen(editFormUrl, "EditDialogWnd"); |
| return false; |
| } |
| function refreshGrid(arg) |
| { |
| if(!arg) |
| { |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind"); |
| } |
| else |
| { |
| $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate"); |
| } |
| } |
| </script> |
| </Telerik:RadCodeBlock> |
no way, the window is always centered.
Any clue?
Lorenzo