I have a RadGrid with various clickable contents. Clicking a column opens a radWindow to display details, depending... no problems there.
But if I click a new link, the content loads in the window as expected, but the window 'creeps' up a tiny bit. if I continue clicking new links, eventually the window creeps high enough to where I can no longer access the close or minimize buttons.
Again, not a big issue, but I can forsee some user sending ME a support ticket because he went 'click crazy' :)
Ideas? I don't have my project handy to post the window code, but I have a RadWindow of 600 x 800, Top=20px, Left=300px, NOT Modal.
Thanks for listening!
Sean
Electronic Arts, Orlando FL
5 Answers, 1 is accepted
Can you please provide some more information? How exactly do you open the RadWindow and how is the RadWindow/RadWindowManager declared on your page?
All the best,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="radData" />
<telerik:AjaxUpdatedControl ControlID="radFilterBar" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="radFilterBar">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="radData" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="radData">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="radData" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<
telerik:RadWindowManager ID="RadWindowManager1" runat="server" VisibleStatusbar="false" EnableEmbeddedBaseStylesheet="false">
<Windows>
<telerik:RadWindow ID="refViewer" Title="Reference Viewer" Height="880px" Width="600px" runat="server" Animation="None" Modal="false" Left="400px" ShowContentDuringLoad="false" ReloadOnShow="true">
</telerik:RadWindow>
<telerik:RadWindow ID="galViewer" Title="Gallery Image List" Height="800px" Width="700px" runat="server" Animation="None" Left="50px" Top="20px" ReloadOnShow="true" ShowContentDuringLoad="false">
</telerik:RadWindow>
<telerik:RadWindow ID="imageViewer" Title="Gallery Image" Height="800px" Width="700px" runat="server" Animation="None" Left="750px" Top="20px" ReloadOnShow="true" ShowContentDuringLoad="false">
</telerik:RadWindow>
<telerik:RadWindow ID="reportViewer" Title="Comment Reports" Height="850px" Width="950px" runat="server" Animation="None" Left="300px" Top="20px" ReloadOnShow="true" ShowContentDuringLoad="false">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<
telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function ShowForm(site, form, rowIndex) {
if (form == 'refViewer') {
var grid = $find("<%= radData.ClientID %>");
var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
grid.get_masterTableView().selectItem(rowControl, true);
}
window.radopen(site, form);
return false;
}
function refreshGrid(arg) {
$find("<%=RadAjaxManager1.ClientID%>").ajaxRequestWithTarget("<%=RadAjaxManager1.ClientID%>", arg);
}
</script>
</telerik:RadCodeBlock>
Here is the code behind that generates the link to open the radWindow:
/// <summary>
/// Binds the hyperlink object to a click event
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void radData_ItemCreated(object sender, GridItemEventArgs e)
{
if (!(e.Item is GridDataItem)) return;
var dr = (DataRowView) e.Item.DataItem;
var editLink = e.Item.FindControl("RefLink") as HyperLink;
if (editLink == null) return;
editLink.Text = dr["EntityName"].ToString();
editLink.Attributes["href"] = "#";
var site = "Ref.aspx?entityid=" + dr["EntityID"];
editLink.Attributes["onclick"] = string.Format("return ShowForm('{0}','{1}', '{2}');", site, "refViewer", e.Item.ItemIndex);
}
---------------------------------------------------------------------------------------
The above code is what you should need to see my issue. I have a RadGrid with several columns. Each column has a Hyperlink in it that I dynamically assign the 'onclick' attribute to. The window opens correctly, no issues.
If I do not close the window, but rather click another link, the data refreshes in the window, but the window itself creeps up slightly (5 pixels maybe?). If I continue to click enough times, the window eventually disappears beneath the browser toolbar, so I cannot access the close butons. I have to refresh the page.
Again, it is not really a great issue. If you would like, I can always submit a support ticket with screenshots.
Thanks for listening!
Sean
Electronic Arts, Orlando FL
I tried to reproduce the problem with the code that you gave me but everything is working fine on my side. At the time being I can suggest to set the KeepInScreenBounds property to true (this should keep the window from appearing outside of the viewport) and if you open a support ticket and send me a small sample project that reproduces the problem I will check it.
Just make sure that the project can be run locally and attach it to the ticket - I will check it right away.
Regards,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
(Is anyone else on your team working my issues? Do you ever sleep? :D)
If yo still have my project from my last support ticket, that is the one I am speaking of. To be honest, the issue is so minor I don't feel the need to waste your time with a ticket.
I was pondering if by setting the 'Top' and 'Left' value was somehow causing the problem. I set them, but never set a reference object. Would that cause it to not know where to reference its top and left from and therefore creep as it does?
Thanks for listening!
Sean
Electronic Arts, Orlando
In general, when OffsetElementID is not set, Top and Left are calculated against the page itself, so this should not be a reason for the problem.
Best wishes,
Georgi Tunev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.