RadWindow in TabStrip causes a small window to open

2 posts, 0 answers
  1. Travis Cotton
    Travis Cotton avatar
    22 posts
    Member since:
    Sep 2009

    Posted 12 Jul 2010 Link to this post

    Not sure what I did wrong with my other post.  Let me try again.  Im trying to open a modal radwindow from inside a tabstrip and its opening the window just fine but its a) too small (like 200px by 200px when it should be much larger) and b) its not modal.  If I place my usercontrol on a regular webform it works just fine.  Only when its in the tabstrip/multipage is it not working properly.  Code is below:

    Web Page:

    <%@ Page Title="" Language="VB" MasterPageFile="~/intranet/IT/CM/MasterPages/CM.master" AutoEventWireup="false" CodeFile="cm.aspx.vb" Inherits="intranet_IT_CM_cm" %>
    <%@ Register src="controls/LogEntryListing.ascx" tagname="LogEntryListing" tagprefix="uc3" %>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <div style="width:100%">
            <telerik:RadTabStrip ID="RadTabStrip1" runat="server"
                MultiPageID="RadMultiPage1" CausesValidation="False" SelectedIndex="1"
                Skin="WebBlue">
                <Tabs>
                    <telerik:RadTab runat="server" Text="Request Log" >
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
                <telerik:RadPageView ID="RadPageView1" runat="server">
                    <uc3:LogEntryListing ID="LogEntryListing1" runat="server" />
                </telerik:RadPageView>
            </telerik:RadMultiPage>
        </div>
    </asp:Content>

    Here is the code for the user control:

    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="LogEntryListing.ascx.vb" Inherits="intranet_IT_CM_controls_LogEntryListing" %>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function ShowLogEntryForm(entryId) {
            window.radopen("LogEntry.aspx?entrytId=" + entryId, "EditLogEntry");
            return false;
        }
    </script>
    </telerik:RadCodeBlock>
     
    <br />
    <asp:Repeater ID="Repeater1" runat="server">
        <ItemTemplate>
            <div style="width:980px;">
                <div style="width:60%;float:left;padding-top:10px;padding-bottom:10px;"><asp:Label CssClass="LabelStyle" ID="lblRequestorName" Text="Project Log Entry Added By:  " runat="server" ></asp:Label></div>
                <div style="width:40%;float:left;padding-top:10px;padding-bottom:10px;"><asp:Label CssClass="LabelStyle" ID="lblRequestDate" Text="Date Entry added:  " runat="server" ></asp:Label><%# DataBinder.Eval(Container.DataItem, "EntryDate")%></div>
            </div>
            <div style="width:980px;float:left;clear:both;padding-bottom:10px">
                <asp:Label CssClass="LabelStyle" ID="lblLogEntry" Text="" runat="server" ></asp:Label><%# DataBinder.Eval(Container.DataItem, "Entry")%>
            </div>
            <div style="width:980px;float:left;clear:both;padding-bottom:30px">
                <asp:LinkButton ID="lbEditRequest" runat="server" style="cursor:hand;"
                ToolTip="Edit This Request" Text="" CausesValidation="false" >
                <asp:Image ID="imgEdit" runat="server" ImageUrl="https://webapps1.richland2.org/images/editicons/pencil.png" Width="12" Height="12" visible="true"/>
                </asp:LinkButton>
                <asp:Image ID="Image3" runat="server" ImageUrl="https://webapps1.richland2.org/images/spacers/spacer.gif" Width="3" Height="1" visible="true"/>
                <asp:LinkButton ID="lbDeleteRequest" runat="server" style="cursor:hand;"
                ToolTip="Delete this request" Text="" CausesValidation="false" CommandName="deleterequest"
                OnClientClick="return confirm('Do you really want to delete this request from the system?\n\n This action cannot be undone.');" >
                <asp:Image ID="Image2" runat="server" ImageUrl="https://webapps1.richland2.org/images/deleteicons/delete.png" Width="12" Height="12" visible="true"/>
                </asp:LinkButton><asp:Label CssClass="LabelStyle" ID="lblEntryId" Text='<%# DataBinder.Eval(Container.DataItem, "EntryId")%>' runat="server" Visible="false"></asp:Label>
            </div>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <div style="width:980px;padding-left:3px;border:1px solid #000000;"
            <div style="width:980px">
                <div style="width:60%;float:left;padding-top:10px;padding-bottom:10px;"><asp:Label CssClass="LabelStyle" ID="lblRequestorName" Text="Project Log Entry Added By:  " runat="server" ></asp:Label></div>
                <div style="width:40%;float:left;padding-top:10px;padding-bottom:10px;"><asp:Label CssClass="LabelStyle" ID="lblRequestDate" Text="Date Entry added:  " runat="server" ></asp:Label><%# DataBinder.Eval(Container.DataItem, "EntryDate")%></div>
            </div>
            <div style="width:980px;float:left;clear:both;padding-bottom:10px;">
                <asp:Label CssClass="LabelStyle" ID="lblLogEntry" Text="" runat="server" ></asp:Label><%# DataBinder.Eval(Container.DataItem, "Entry")%>
            </div>
            <div style="width:980px;float:left;clear:both;padding-bottom:30px">
                <asp:LinkButton ID="lbEditRequest" runat="server" style="cursor:hand;"
                ToolTip="Edit This Request" Text="" CausesValidation="false" >
                <asp:Image ID="imgEdit" runat="server" ImageUrl="https://webapps1.richland2.org/images/editicons/pencil.png" Width="12" Height="12" visible="true"/>
                </asp:LinkButton>
                <asp:Image ID="Image3" runat="server" ImageUrl="https://webapps1.richland2.org/images/spacers/spacer.gif" Width="3" Height="1" visible="true"/>
                <asp:LinkButton ID="lbDeleteRequest" runat="server" style="cursor:hand;"
                ToolTip="Delete this request" Text="" CausesValidation="false" CommandName="deleterequest"
                OnClientClick="return confirm('Do you really want to delete this request from the system?\n\n This action cannot be undone.');" >
                <asp:Image ID="Image2" runat="server" ImageUrl="https://webapps1.richland2.org/images/deleteicons/delete.png" Width="12" Height="12" visible="true"/>
                </asp:LinkButton><asp:Label CssClass="LabelStyle" ID="lblEntryId" Text='<%# DataBinder.Eval(Container.DataItem, "EntryId")%>' runat="server" Visible="false"></asp:Label>
            </div>
            </div>
        </AlternatingItemTemplate>
    </asp:Repeater>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="WebBlue">
        <Windows>
            <telerik:RadWindow ID="EditLogEntry" runat="server" Title="Editing Log Entry" Height="475px"
                Width="990px" Left="50px" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" KeepInScreenBounds="True">  
               
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
  2. Travis Cotton
    Travis Cotton avatar
    22 posts
    Member since:
    Sep 2009

    Posted 13 Jul 2010 Link to this post

    Tech support got back to me on this so I thought I would follow up.  The problem was described to me like this:

    "Such behavior would occur if you have more than 1 RadWindowManagers on the page. In such case, RadWindowManager's functions like radopen(), radalert(), GetRadWindowManager(), etc. will always use the RadWindowManager that is firstly rendered on the page.
    To avoid that, I would suggest to first get a reference to the needed RadWindowManager object and then to call its open() method.
    e.g.
    var manager = $find("<%= RadWindowManager1.ClientID %>");
    manager.open("myUrl", "myRadWindow"); "

    In my case the problem was my page had multiple user controls loaded on a page with a tab control ( I omitted the other controls in my code posting for brevity).  One of the other controls had a RadWindowManager in it.  So to fix the problem I simply moved the RadWindowManager to the web form that hosts the tab control and all the user controls.

    Problem solved.
Back to Top