I tried using the solution stated here but it does not work:
http://www.telerik.com/community/forums/thread/b311D-bctcdg.aspx
The modal popup window has a RadGrid which is populated from a database. So it takes some time for the grid to appear while it populates the data.
Here is the ASPX code:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" VisibleStatusbar="false">
<Windows>
<telerik:radwindow runat="server" ID="RadWindow1"
VisibleOnPageLoad = "false"
OffsetElementID = "offsetElement"
Title = ""
Height="550px"
Width ="300px"
Skin="Default" BackColor ="Transparent"
Behaviors="Close,Reload,Move"
EnableAjaxSkinRendering="true"
ShowContentDuringLoad="false" VisibleStatusbar="true" Modal="true" Animation="None" VisibleTitlebar="true" DestroyOnClose="false" BorderWidth="0" ReloadOnShow="true" BorderStyle="None"
OnClientClose="OnClientClose" >
</telerik:radwindow>
</Windows>
</telerik:RadWindowManager>
The url is constructed dynamically after several conditions are checked to construct a query string. The url is pretty long.
The radwindow is shown through the following javascript:
function openRadWindow(url, RadWindowID, RadWindowManagerID)
{
var oWnd = $find(RadWindowManagerID).GetWindowByName(RadWindowID);
oWnd.SetUrl(url);
oWnd.Show();
return false;
}
I tried something like this:
function OnClientShow(radWindow)
{
radWindow.SetHeight(550);
radWindow.SetWidth(300);
}
but the problem is that it does call this event, but once the grid is populated in the popup the url in the status bar resizes the window's width after the OnClientShow event is fired.
The main objective is to show that some work is being done or a loading panel while the grid in the popup is being populated. The status bar takes care of that but once the url is loaded it resizes the window. And since radajaxloadingpanel and RadAjaxManager only work for updates and not on page load, that does not help either. I tried using the example
http://www.telerik.com/help/aspnet/ajax/?ajxShowLoadingPanelOnInitialPageLoad.html
It works but the loadingpanel on page load appears after the the loadingpanel inside of the radwindow statusbar goes away, which again is too late. I know that I can change the skin but this is the skin that is required.
The most accurate loading panel is the one that is inside of the radwindow statusbar.
So, basically I want to retain the current behavior, but somehow restrict the window resize due to the url.
Regards,
Tal