Hi,
I am developing a report screen for internal use on my company and I need to have the RadWindow functionality enabled, however I ran into an issue with positioning. I've searched a lot about it but couldn't find a solution for the issue.
For the record, I'm using VS2010, Framework 4.0, Windows 7, Telerik RadControls for ASP.NET AJAX Q1 2010 SP1.
I'm calling the rad window through radopen on client-site as you can see below (some parts of the script have been removed):
var
ReportHandler =
function
() {
var
lnkExportToExcel;
// other implementation
var
GetQueryString =
function
() {
// other implementation
};
var
lnkExportToExcel_Click =
function
(event) {
window.radopen(
"ExportOptions.aspx?"
+ GetQueryString(),
"wndExportOptions"
);
return
false
;
};
var
EndRequestHandler =
function
() {
InitializeReportHandler();
// other implementation
};
var
InitializeReportHandler =
function
() {
lnkExportToExcel = $(
"#lnkExportToExcel"
);
lnkExportToExcel.bind(
"click"
,
null
, lnkExportToExcel_Click);
// other implementation
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
};
this
.Start =
function
() {
InitializeReportHandler();
};
}
$(
function
() {
new
ReportHandler().Start();
});
This is the markup of the content page which uses the script:
[...]
<
asp:Content
ID
=
"theBody"
ContentPlaceHolderID
=
"MainContent"
runat
=
"server"
>
<
form
id
=
"frmReport"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"transactionStatisticsScriptManager"
runat
=
"server"
/>
<
telerik:RadWindowManager
ID
=
"tsWindowManager"
Overlay
=
"true"
runat
=
"server"
Behaviors
=
"Move,Close"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"wndExportOptions"
runat
=
"server"
Modal
=
"true"
Overlay
=
"true"
IconUrl
=
"/images/procom.png"
Title
=
"Export Options"
VisibleStatusbar
=
"false"
Height
=
"210px"
Width
=
"300px"
ShowContentDuringLoad
=
"false"
>
</
telerik:RadWindow
>
<
telerik:RadWindow
ID
=
"wndViewDetails"
runat
=
"server"
Modal
=
"true"
Overlay
=
"true"
IconUrl
=
"/images/procom.png"
Title
=
"View Details"
VisibleStatusbar
=
"false"
Height
=
"450px"
Width
=
"900px"
ShowContentDuringLoad
=
"false"
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
<
asp:UpdatePanel
ID
=
"transactionStatisticsUpdatePanel"
runat
=
"server"
>
</
ContentTemplate
>
[...]
<
telerik:RadGrid
ID
=
"grdSearchResults"
Width
=
"968px"
runat
=
"server"
[...Other definitions...]>
<
MasterTableView
EnableNoRecordsTemplate
=
"true"
CommandItemDisplay
=
"Top"
>
<
CommandItemTemplate
>
<
a
id
=
"lnkExportToExcel"
href
=
"#"
>
<
img
src
=
"images/excel.gif"
width
=
"22px"
height
=
"22px"
border
=
"0px"
alt
=
"<%= GetGlobalResourceObject("
TransactionStatistics", "ExportToExcelAlt").ToString() %>"
title="<%= GetGlobalResourceObject("TransactionStatistics", "ExportToExcelAlt").ToString() %>"/>
</
a
>
</
CommandItemTemplate
>
[...Rest of the Grid...]
[...]
</
ContentTemplate
>
</
asp:UpdatePanel
>
<
script
src
=
"scripts/jquery-1.4.1.js"
type
=
"text/javascript"
></
script
>
<
script
src
=
"scripts/ReportHandler.dev.js"
type
=
"text/javascript"
></
script
>
</
form
>
</
asp:Content
>
The rad window is being displayed when I click the excel image defined on the CommandItemTemplate section, however, it does not display it on the correct position. I haven't modified anything regarding the position of the window either through markup or css; I was expecting it to be centralized by default.
What happens is that it opens a bit past the center torwards the right side of the page. I can see that the overlay is also being displayed with a huge space (some sort of margin/padding or whatever) from the left side of the browser window, as if it was starting form the actual content page and not from the entire page (which is a merge from master page and content) so I would assume it does not support master page, but I hope is not the case.
Another very annoying issue I'm having is that when I close the RadWindow, if I click the button again, it opens even more on the right, and it happens subsequently until it's completely off the screen. The horizontal scroll bar has a lot more space to be rolled torwards the left and it increases every time I open one of these windows.
Also, if I try to drag the window around, it makes the horizontal scroll bar go nuts and gets even larger. As soon as I drop the window on the position I want, it moves itself to the right, completely going off the screen.
Please see the attached images to have an idea of what's happening on the UI.
img1.png shows the screen before I click the export to excel icon;
img2.png shows the screen when I click the export to excel icon for the first time;
img3.png shows the screen when I click the export to excel icon for the second time.
I haven't added more images, but the behaviour is the same, it keeps going torwards the right until it's completely off the screen and the scroll bar gets huge.
I really need some help with this guys.
Thanks
Update: It seems to have a normal behavior when I run the app using a one-monitor computer with small screen resolution (1024x768). The screenshots I sent previously where from a two-monitor computer on a 1920x1080 screen resolution. I have added an attachment (problem with safari, had to add attachment on other post of this same thread) which shows the expected behavior.