This is a migrated thread and some comments may be shown as answers.

Properties getting ignored

4 Answers 70 Views
Window
This is a migrated thread and some comments may be shown as answers.
Martin Roussel
Top achievements
Rank 1
Martin Roussel asked on 18 Sep 2012, 05:53 PM
Im trying to replicate this demo into my application: DEMO. I succeeded at creating a RadWindow popping up when double-click on a hierarchical RadGrid row. The problem is all RadWindow properties im defining into the <telerik:RadWindow> tag seem to be ignored. In fact, im getting the exact same results with the two following alternate declaration of my RadWindow (the second is same than first..and none of the OnClientX methods are fired):
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                            <Windows>
                                <telerik:RadWindow ID="RadWindow1" runat="server"
                                      Width="310px" Left="150px" />
                            </Windows>
</telerik:RadWindowManager>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                            <Windows>
                                <telerik:RadWindow ID="RadWindow1" runat="server" Title="Reply" Height="320px"
                                    Width="910px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                                    Modal="true" OnClientBeforeClose="OnClientBeforeClose" OnClientClose="OnClientClose"/>
                            </Windows>
</telerik:RadWindowManager>


here's the rest of the related code:
                        <telerik:RadGrid ID="RadGrid5" runat="server" Width="99.7%" PageSize="20" AllowPaging="false"
                            AllowSorting="True" AllowFilteringByColumn="false" AllowMultiRowSelection="false"
                            ShowGroupPanel="false" GridLines="None" ShowFooter="false" ShowHeader="true" GroupingEnabled="false"
                            Skin="WebBlue" EnableHeaderContextAggregatesMenu="false" EnableHeaderContextMenu ="false"
                            AutoGenerateColumns="false" EnableViewState="True"
                            OnItemCommand="RadGrid5_OnItemCommand" OnDetailTableDataBind="RadGrid5_DetailTableDataBind" OnNeedDataSource="RadGrid5_NeedDataSource"
                            OnGroupsChanging="RadGrid5_OnGroupsChanging" OnColumnsReorder="RadGrid5_OnColumnsReorder" OnItemDataBound="RadGrid5_OnItemDataBound"
                            OnPreRender="RadGrid5_PreRender">
                             
                            <MasterTableView HierarchyLoadMode="ServerBind" Name="Master"
                             CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false"
                             CommandItemSettings-ShowExportToExcelButton="true" CommandItemSettings-ShowExportToWordButton="true"
                             CommandItemSettings-ShowExportToPdfButton="true" CommandItemSettings-ShowExportToCsvButton="true" AllowMultiColumnSorting="true"
                             Caption="" ClientDataKeyNames="intEnterpriseSiteCommentID">
                             
 
                                 <Columns>
                                        <telerik:GridBoundColumn Visible="false" DataField="intEnterpriseSiteCommentID" UniqueName="intEnterpriseSiteCommentID">
                                        </telerik:GridBoundColumn>
                                        <telerik:GridTemplateColumn Visible="false" HeaderText="PSG" meta:resourcekey="labPSG" UniqueName="blnIsInternalOnly" HeaderStyle-Width="4%" Resizable="true" Reorderable="true" SortExpression="blnIsInternalOnly">
                                            <ItemTemplate>
                                                <asp:Image runat="server" ID="ImageLogo" ToolTip="PSG Only" meta:resourcekey="labPSGOnly" AlternateText="" ImageUrl="~/Images/Icons/logo small.PNG" Height="20px" Width="20px" BorderWidth="0"></asp:Image>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                         
                                        <telerik:GridDateTimeColumn DataField="dtCreationDate" HeaderText="Date" meta:resourcekey="labDate" UniqueName="dtCreationDate" HeaderStyle-Width="12%" Resizable="true" Reorderable="true" SortExpression="dtCreationDate" DataFormatString="{0:yyyy-MM-dd HH:mm}">
                                        </telerik:GridDateTimeColumn>
                                        <telerik:GridBoundColumn DataField="strUserDisplayName" HeaderText="By" meta:resourcekey="labBy" UniqueName="strUserDisplayName" HeaderStyle-Width="16%" Resizable="true" Reorderable="true" SortExpression="strUserDisplayName">
                                            
                                        </telerik:GridBoundColumn>
 
                                        <telerik:GridBoundColumn DataField="strComment" HeaderText="Comment" meta:resourcekey="labComment" UniqueName="strComment" HeaderStyle-Width="51%" Resizable="true" Reorderable="true" SortExpression="strComment">
                                          
                                        </telerik:GridBoundColumn>
 
                                        <telerik:GridTemplateColumn HeaderText="Status" meta:resourcekey="labStatus" UniqueName="colStatus" HeaderStyle-Width="5%" Resizable="true" Reorderable="true" SortExpression="blnIsSomeoneNeedingAttention">
                                            <ItemTemplate>
                                                <asp:Image runat="server" ID="ImageAttention" Visible="false" ToolTip="Needs Attention" meta:resourcekey="imgNeedsAttention" AlternateText="" ImageUrl="~/Images/Icons/important.png" Height="20px" Width="20px" BorderWidth="0" CssClass="CommentStatusImage"></asp:Image>
                                                <asp:Image runat="server" ID="ImageTreated" Visible="false" ToolTip="Treated" meta:resourcekey="imgTreated" AlternateText="" ImageUrl="~/Images/Icons/treated.png" Height="20px" Width="20px" BorderWidth="0" CssClass="CommentStatusImage"></asp:Image>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
 
                                        <telerik:GridDateTimeColumn DataField="dtLastReplyDate" HeaderText="Last Reply" meta:resourcekey="labLastReply" UniqueName="dtLastReplyDate" HeaderStyle-Width="12%" Resizable="true" Reorderable="true" SortExpression="dtLastReplyDate" DataFormatString="{0:yyyy-MM-dd HH:mm}">
                                        </telerik:GridDateTimeColumn>
 
                                         
                                  </Columns
 
                                        <DetailTables>
                                            <telerik:GridTableView ShowHeader="true" Name="Detail" AllowSorting="false" ClientDataKeyNames="intEnterpriseSiteCommentID"> <%--HeaderStyle-CssClass="NestedGridHeader"--%>
                                              
                                                <Columns>
                                                    <telerik:GridBoundColumn Visible="false" DataField="intEnterpriseSiteCommentID" UniqueName="intEnterpriseSiteCommentID">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridTemplateColumn Visible="false" HeaderText="PSG" meta:resourcekey="labPSG" UniqueName="blnIsInternalOnly" HeaderStyle-Width="4%" Resizable="true" Reorderable="true" SortExpression="blnIsInternalOnly">
                                                        <ItemTemplate>
                                                            <asp:Image runat="server" ID="ImageLogo" ToolTip="PSG Only" meta:resourcekey="labPSGOnly" AlternateText="" ImageUrl="~/Images/Icons/logo small.PNG" Height="20px" Width="20px" BorderWidth="0"></asp:Image>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
 
                                                    <telerik:GridDateTimeColumn DataField="dtCreationDate" HeaderText="Date" meta:resourcekey="labDate" UniqueName="dtCreationDate" HeaderStyle-Width="12%" Resizable="true" Reorderable="true" SortExpression="dtCreationDate" DataFormatString="{0:yyyy-MM-dd HH:mm}">
                                                    </telerik:GridDateTimeColumn>
 
                                                    <telerik:GridBoundColumn DataField="strUserDisplayName" HeaderText="By" meta:resourcekey="labBy" UniqueName="strUserDisplayName" HeaderStyle-Width="16%" Resizable="true" Reorderable="true" SortExpression="strUserDisplayName">
                                                       
                                                    </telerik:GridBoundColumn>
 
                                                    <telerik:GridBoundColumn DataField="strComment" HeaderText="Reply" meta:resourcekey="labHTReply" UniqueName="strComment" HeaderStyle-Width="63%" Resizable="true" Reorderable="true" SortExpression="strComment">
                                                   
                                                    </telerik:GridBoundColumn>
 
                                                    <telerik:GridTemplateColumn HeaderText="Status" meta:resourcekey="labStatus" UniqueName="colStatus" HeaderStyle-Width="5%" Resizable="true" Reorderable="true" SortExpression="blnIsSomeoneNeedingAttention">
                                                        <ItemTemplate>
                                                            <asp:Image runat="server" ID="ImageAttention" Visible="false" ToolTip="Needs Attention" meta:resourcekey="imgNeedsAttention" AlternateText="" ImageUrl="~/Images/Icons/important.png" Height="20px" Width="20px" BorderWidth="0" CssClass="CommentStatusImage"></asp:Image>
                                                            <asp:Image runat="server" ID="ImageTreated" Visible="false" ToolTip="Treated" meta:resourcekey="imgTreated" AlternateText="" ImageUrl="~/Images/Icons/treated.png" Height="20px" Width="20px" BorderWidth="0" CssClass="CommentStatusImage"></asp:Image>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                </Columns>  
                                            </telerik:GridTableView>
                                        </DetailTables>
 
                            </MasterTableView>
 
                            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
 
                                    <ClientSettings EnablePostBackOnRowClick="false" AllowRowsDragDrop="false" AllowDragToGroup="false" AllowColumnsReorder="false" ReorderColumnsOnClient="false" ColumnsReorderMethod="Reorder">
                                        <Resizing AllowRowResize="False" EnableRealTimeResize="True" ResizeGridOnColumnResize="false" AllowColumnResize="true" AllowResizeToFit="true"/>
                                        <Animation AllowColumnReorderAnimation="false" AllowColumnRevertAnimation="true" />
                                        <Selecting AllowRowSelect="true"  />
                                        <ClientEvents  OnRowDblClick="ShowWindow" ></ClientEvents>
                                    </ClientSettings>
                                    <SortingSettings SortedBackColor="Azure" EnableSkinSortStyles="false" />
 
                           <GroupingSettings ShowUnGroupButton="true" />
 
</telerik:RadGrid>

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
                    <script type="text/javascript">
                        function ShowWindow() {
                            window.radopen("Test.aspx", "RadWindow1");
                        }
                    </script>
      </telerik:RadCodeBlock>

Can someone please spot what is wrong in my code?

TIA

4 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Sep 2012, 06:17 AM
Hi Martin,

Try setting the properties for the RadWindowManager as shown below.
aspx:
<telerik:RadWindowManager ID="RadWindowManager1" EnableShadow="true" runat="server"  Title="Reply" Height="320px" Width="910px" Modal="true" Left="150px">
     <Windows>
     <telerik:RadWindow ID="RadWindow2"  runat="server"></telerik:RadWindow>
      </Windows>
</telerik:RadWindowManager>

Thanks,
Princy.
0
Martin Roussel
Top achievements
Rank 1
answered on 19 Sep 2012, 11:11 AM
Princy,

Unfortunately, same results.

Martin
0
Accepted
rdmptn
Top achievements
Rank 1
answered on 19 Sep 2012, 12:31 PM
0
Martin Roussel
Top achievements
Rank 1
answered on 19 Sep 2012, 01:05 PM
Thanks!

Ive solved it using the following code to open the window:

var oWnd = $find("<%=RadWindow1.ClientID%>");
oWnd.setUrl("Test.aspx");
oWnd.show();

I cant figure out why I have to use this since I only have one RadWindowManager in my page. I would like to solve this and make sure I do not waste memory for nothing (by having hidden duplicate manager(s) and/or window(s))
Tags
Window
Asked by
Martin Roussel
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Martin Roussel
Top achievements
Rank 1
rdmptn
Top achievements
Rank 1
Share this question
or