Issues with RadWindow

3 posts, 0 answers
  1. Joe
    Joe avatar
    48 posts
    Member since:
    Mar 2009

    Posted 30 Aug 2010 Link to this post


    I'm having issues with the resizing of the RadWindw.  I have a grid that contains an edit link that the user clicks on the window.  However when the user closes the window and clicks edit for another row in the grid the RadWindow looses it setup size and the window is very small.

    Here is the code that contains this information:
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script language="javascript" type="text/javascript">
                function EditSchedule(taskid,rowIndex) {
                    var grid = $find("<%=AstonishDataManagement.ClientID%>");
                    var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
                    grid.get_masterTableView().selectItem(rowControl, true);
                    window.radopen("Datascheduledetail.aspx?TaskId=" + taskid, "UserListDialog"); ;
                    return false;
                function Openform() {
                    window.radopen("Datascheduledetail.aspx", "UserListDialog");
                    return false;
     <telerik:RadWindowManager Behaviors="Close,Resize,Maximize,Move" runat="server" ID="RWinMgr"
            ShowContentDuringLoad="true" DestroyOnClose="true" KeepInScreenBounds="true"
            VisibleStatusbar="false" Modal="true" Style="z-index: 8000;" Skin="Office2007">
                <telerik:RadWindow ID="UserListDialog" runat="server" Title="Edit Schedule" Height="550px"
                    Width="750px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                    Modal="true" />
    The grid caller partial code:
    <telerik:RadGrid ID="AstonishDataManagement" runat="server" AllowPaging="True" AllowSorting="True"
            ClientSettings-Scrolling-AllowScroll="false" AutoGenerateColumns="False" GridLines="None"
            Skin="Office2007" PageSize="10" OnNeedDataSource="AstonishDataManagement_NeedDataSource"
            ClientSettings-Resizing-AllowColumnResize="false" OnInsertCommand="AstonishDataManagement_InsertCommand"
            OnUpdateCommand="AstonishDataManagement_UpdateCommand" OnCreateColumnEditor="AstonishDataManagement_OnCreateColumnEditor"       
            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
            <MasterTableView Name="tblAstonishDataManagement" DataKeyNames="TaskId" AllowNaturalSort="false"
                    <telerik:GridTemplateColumn UniqueName="TemplateEditColumn" HeaderStyle-Width="5px">
                            <asp:HyperLink ID="EditLink" runat="server" Text="Edit"></asp:HyperLink>

      protected void AstonishDataManagement_ItemCreated(object sender, GridItemEventArgs e)
                if (e.Item is GridDataItem)
                    HyperLink editLink = (HyperLink)e.Item.FindControl("EditLink");
                    editLink.Attributes["href"] = "#";
                    editLink.Attributes["onclick"] = String.Format("return EditSchedule('{0}','{1}');",
                    e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["TaskId"], e.Item.ItemIndex);

  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 31 Aug 2010 Link to this post

    Hello Joe,

    In your code you have set DestroyOnClose to true. When this property is set to true, RadWindow’s object will be destroyed once the window is closed. This, however,  means that you will not be able to open that same RadWindow again until the whole page is reloaded. In such scenario, it will be best to either set all needed properties (width, height, modality, etc.) to the RadWindowManager or as an alternative – to use the client-side API and set them when opening the RadWindow.

    Kind regards,
    Georgi Tunev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Joe
    Joe avatar
    48 posts
    Member since:
    Mar 2009

    Posted 31 Aug 2010 Link to this post

    Awesome that worked.  Thank You very much.
Back to Top