I have a grid which is populated from a webservice with the required data. I then have a nested template where I show, inside a FormView, further details for the partiular record I selected to expand. I created an object data source for this, which ultimately also talks to a web service to retreive the data.
It works fine for individual records retrieved one at a time, however, when I try to expand two records at the same time, both "views" are updated with the exact same information, instead of keeping the details for each record independently.
I think I know that this happens because it refreshes the datasource everytime I select a new record to expand. The problem is that I don't know how to tell the grid (and therefore the nested formview) not to refresh all open windows but only the one expanded.
Here is an excerpt from my code:
The OnNeedDataSource event is used for filtering of the Master table.
Is there anything I need to set in order to prevent the nested formviews to update with each request?
Thank you
It works fine for individual records retrieved one at a time, however, when I try to expand two records at the same time, both "views" are updated with the exact same information, instead of keeping the details for each record independently.
I think I know that this happens because it refreshes the datasource everytime I select a new record to expand. The problem is that I don't know how to tell the grid (and therefore the nested formview) not to refresh all open windows but only the one expanded.
Here is an excerpt from my code:
<telerik:RadGrid ID="OrbitRadGrid" runat="server" AllowFilteringByColumn="True" AllowSorting="True" VirtualItemCount="50000" GridLines="None" AllowPaging="true" PageSize="30" AllowCustomPaging="true" ShowGroupPanel="false" EnableLinqExpressions="false" OnNeedDataSource="OrbitRadGrid_NeedDataSource" OnSortCommand="OrbitRadGrid_SortCommand" Skin="WebBlue" > <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="False" ReorderColumnsOnClient="True"> <Scrolling AllowScroll="True" EnableVirtualScrollPaging="True" UseStaticHeaders="True" SaveScrollPosition="True" /> <Resizing AllowColumnResize="True" /> </ClientSettings> <MasterTableView DataKeyNames="Item_Name, Source_Name" AutoGenerateColumns="False" AllowNaturalSort="false"> <Columns> <telerik:GridBoundColumn DataField="Item_Name" HeaderText="Item Name" ReadOnly="True" SortExpression="Item_Name" UniqueName="Item_Name" HeaderStyle-Width="220px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Source_Name" HeaderText="Item Source" ReadOnly="True" SortExpression="Source_Name" UniqueName="Source_Name" HeaderStyle-Width="220px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ItemType_Name" HeaderText="Item Type" ReadOnly="True" SortExpression="ItemType_Name" UniqueName="ItemType_Name" HeaderStyle-Width="115px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Team_Name" HeaderText="Item Team" ReadOnly="True" SortExpression="Team_Name" UniqueName="Team_Name" HeaderStyle-Width="115px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="IsTestItem" HeaderText="Test" ReadOnly="True" UniqueName="IsTestItem" AllowFiltering="false" HeaderStyle-Width="50px"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="IsItemOnHold" HeaderText="On Hold" ReadOnly="True" UniqueName="IsItemOnHold" AllowFiltering="false" HeaderStyle-Width="62px"> </telerik:GridBoundColumn> </Columns> <NestedViewSettings DataSourceID="MasterItemsDetails" > <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="ItemName" MasterKeyField="Item_Name" /> <telerik:GridRelationFields DetailKeyField="ItemSource" MasterKeyField="Source_Name" /> </ParentTableRelation> </NestedViewSettings> <NestedViewTemplate> <asp:FormView ID="FormView" runat="server" DataSourceID="MasterItemsDetails"> <ItemTemplate> <asp:Panel ID="NestedViewPanel" runat="server" CssClass="viewWrap"> <div class="contactWrap"> <table> <tr> <td> <fieldset style="padding: 10px;"> <legend style="padding: 5px;"><b>General info</b></legend> <table width="400"> ... </table> </fieldset> </td> <td> <table width="200"> <tr> <td> <fieldset style="padding: 10px;"> <legend style="padding: 5px;"><b>Status</b></legend> <table> ... </table> </fieldset> </td> </tr> <tr> <td> <fieldset style="padding: 10px;" > <legend style="padding: 5px;"><b>Coverage</b></legend> <table> ... </table> </fieldset> </td> </tr> </table> </td> <td> <fieldset style="padding: 10px;" > <legend style="padding: 5px;"><b>Rejection Information</b></legend> <table width="300"> ... </table> </fieldset> </td> </tr> </table> </div> </asp:Panel> </ItemTemplate> </asp:FormView> </NestedViewTemplate> </MasterTableView> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu> </telerik:RadGrid> <asp:ObjectDataSource runat="server" ID="MasterItemsDetails" SelectMethod="Get" TypeName="Orbit3UI.Model.MasterItemDetailsDataSource"> <SelectParameters> <asp:Parameter Name="itemName" Type="String" /> <asp:Parameter Name="itemSource" Type="String" /> </SelectParameters> </asp:ObjectDataSource>The OnNeedDataSource event is used for filtering of the Master table.
Is there anything I need to set in order to prevent the nested formviews to update with each request?
Thank you