Hello, I am looking for support with the radwindowmanager and the autosize and autosize behavior properties...I've been trying to implement the same scenario as these two links:
- http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/autosizing-issues
-http://demos.telerik.com/aspnet-ajax/window/examples/autosize/defaultcs.aspx
no luck... I always need to have a width and a height coming from the codebehind, else it only displays a small square. I am not sure if this is cause by the way the app is programmed...anyway hope somebody can jump in and help out. Thanks...here is the code driving the window:
starts here:
gui.OpenRadWindow(
url: "/Pages/Inventory/Add_Product.aspx",
width: 800,
height: 550,
title: "Add Product",
modal: true,
javascriptOnClientClose: "OnClientClose",
page: Page
);
goes to here:
public void OpenRadWindow(string url, int width, int height, string title, bool modal, WindowBehaviors behaviors, bool showDuringLoad, string javascriptOnClientClose, Page page)
{
RadWindowManager winMgr = null;
winMgr = (RadWindowManager)page.Master.FindControl("RadWindowManager_Global");
if (winMgr != null)
{
RadWindow radWindowForm = new RadWindow();
radWindowForm.ID = "radWindowForm_" + Guid.NewGuid().ToString();
radWindowForm.MinWidth = new System.Web.UI.WebControls.Unit(width,System.Web.UI.WebControls.UnitType.Pixel);
radWindowForm.MinHeight = new System.Web.UI.WebControls.Unit(height, System.Web.UI.WebControls.UnitType.Pixel);
radWindowForm.AutoSize = true;
radWindowForm.AutoSizeBehaviors = WindowAutoSizeBehaviors.Default;
radWindowForm.Title = title;
radWindowForm.Modal = modal;
radWindowForm.NavigateUrl = url;
radWindowForm.Behaviors = behaviors;
radWindowForm.EnableShadow = true;
radWindowForm.EnableTheming = true;
radWindowForm.KeepInScreenBounds = true;
radWindowForm.ShowContentDuringLoad = showDuringLoad;
radWindowForm.VisibleStatusbar = false;
radWindowForm.VisibleOnPageLoad = true;
radWindowForm.OnClientClose = javascriptOnClientClose;
winMgr.EnableViewState = false;
winMgr.Windows.Add(radWindowForm);
}
}
this is the control in master page:
<telerik:RadWindowManager ID="RadWindowManager_Global" runat="server" AutoSize="true" AutoSizeBehaviors="Default" Style="z-index: 7001" />
thanks for the support. I will add additional info if needed.