Hi,
I have two radGrids, one as the upper level one, one inside the nestedViewTemplate. When I expand the row of the upper level grid, the inner Grid will be shown up. The data shown in the inner table is dependent on some id. I followed the Hierarchy with Templates demo on telerik.com. However, I got the following problem:
1. When I click one row, I got the right inner Grid. When I click another row, the first inner Grid will be updated with the seconde inner Grid information even though they should be different. When I click a third row, all three inner grid will have the third inner grid information.
2. When I collapse the third row, the two inner Grids of expanded rows will have the second row information.
In all, the inner grid is always upated with the latest expanded row. I followed the demo, don't know why i have such strange problem. Can u help me out?
Here is the code:
BTW, i will store the generalID in a session variable every time I click the row and use session parameter to databind the innerGrid.
I have two radGrids, one as the upper level one, one inside the nestedViewTemplate. When I expand the row of the upper level grid, the inner Grid will be shown up. The data shown in the inner table is dependent on some id. I followed the Hierarchy with Templates demo on telerik.com. However, I got the following problem:
1. When I click one row, I got the right inner Grid. When I click another row, the first inner Grid will be updated with the seconde inner Grid information even though they should be different. When I click a third row, all three inner grid will have the third inner grid information.
2. When I collapse the third row, the two inner Grids of expanded rows will have the second row information.
In all, the inner grid is always upated with the latest expanded row. I followed the demo, don't know why i have such strange problem. Can u help me out?
Here is the code:
<Telerik:RadGrid Height ="612" ID="Results" HorizontalAlign="Center" runat="server" AllowPaging="True" AllowSorting="True" |
Font-Names="Tahoma" OnItemCommand="Results_OnItemCommand" GridLines="None" Skin="Office2007" |
OnPreRender="Results_PreRender" OnExcelExportCellFormatting="dgResults_ExcelExportCellFormatting" OnPageSizeChanged ="dgResults_pageSizeChanged"> |
<MasterTableView Width ="98.5%" TableLayout="auto" GroupLoadMode ="client" DataKeyNames ="General ID" > |
<Columns> |
</Columns> |
<NestedViewSettings DataSourceID="AccessDataSource1"> |
<ParentTableRelation> |
<telerik:GridRelationFields DetailKeyField="GeneralID" MasterKeyField="General ID" /> |
</ParentTableRelation> |
</NestedViewSettings> |
<NestedViewTemplate> |
<asp:Panel runat="server" ID="InnerContainer" CssClass ="viewWrap" Visible="false"> |
<telerik:radGrid HorizontalAlign ="center" ID ="dgResutls_inner" runat ="server" OnNeedDataSource ="inner_needDataSource" AllowPaging="True" AllowSorting="True" Skin="Office2007" > |
<AlternatingItemStyle Font-Size="8pt" CssClass="MyAlternatingClass" wrap="False"/> |
<ItemStyle Font-Names="Tahoma" Font-Size="8pt" CssClass ="MyClass" wrap="False" /> |
<HeaderStyle Font-Bold="True" Font-Size="9pt" ForeColor="Black" Wrap="False" HorizontalAlign="Center" /> |
<ClientSettings > |
<Selecting AllowRowSelect ="true" /> |
</ClientSettings> |
<MasterTableView TableLayout ="auto" > |
</MasterTableView> |
</telerik:radGrid> |
</asp:Panel> |
</NestedViewTemplate> |
</MasterTableView> |
</Telerik:RadGrid> |
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetResults" UpdateMethod="GetResults" InsertMethod="GetResults" TypeName="iFindSearchDB"></asp:ObjectDataSource> |
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="stage.mdb" SelectCommand="SELECT * FROM [stage] where GeneralID=@GeneralID"> |
<SelectParameters> |
<asp:SessionParameter Name="GeneralID" SessionField="GeneralID" Type="Int32" /> |
</SelectParameters> |
</asp:AccessDataSource> |