Hello forumees,
I have the following 2 level grid in place. I have combed forums and guides and am miffed. I need the ability to click(select) the second level(nested) grid ONLY and also ensure only one grid node can be expanded at any time? If anybody has source, i'd be happy to explore and thanks for the help. Ajax manager left out for brevity. Please excuse VPC: in place of telerik: tagnames.
Here's current code:
Thank you!
I have the following 2 level grid in place. I have combed forums and guides and am miffed. I need the ability to click(select) the second level(nested) grid ONLY and also ensure only one grid node can be expanded at any time? If anybody has source, i'd be happy to explore and thanks for the help. Ajax manager left out for brevity. Please excuse VPC: in place of telerik: tagnames.
Here's current code:
<VPC:RadGrid ID="kitsPerUserGrid" Width="445" AutoGenerateColumns="false" GridLines="None" AllowMultiRowSelection="true" OnDetailTableDataBind="AssignedKitsPerUserDetailTableDataBind" EnableEmbeddedSkins="false" Skin="SonyGrid" runat="server"> |
<ClientSettings> |
<Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> |
<ClientEvents OnRowContextMenu="RowContextMenu" /> |
</ClientSettings> |
<MasterTableView DataKeyNames="AssignedUser"> |
<DetailTables> |
<VPC:GridTableView DataKeyNames="AssignedUser" GroupsDefaultExpanded="true" Name="assignedUserKitDetails" Width="100%" GridLines="None"> |
<Columns> |
<VPC:GridClientSelectColumn /> |
<VPC:GridBoundColumn DataField="RecId" UniqueName="RecId" ReadOnly="true" ItemStyle-Width="15%" /> |
<VPC:GridBoundColumn DataField="Kits" UniqueName="Kits" ReadOnly="true" ItemStyle-Width="50%" /> |
<VPC:GridBoundColumn DataField="Parts" UniqueName="Parts" ReadOnly="true" ItemStyle-Width="25%" /> |
<VPC:GridBoundColumn DataField="UsersOrder" UniqueName="UsersOrder" ItemStyle-Width="10%" /> |
</Columns> |
<NestedViewTemplate> |
<fieldset> |
<legend> Part(s) for Kit: |
<asp:Label ID="RecID" Text='<%# Eval("RecId") %>' Visible="false" runat="server" /> |
<asp:Label ID="KitsSmallDescription" Text='<%# Eval("Kits") %>' runat="server" /> |
</legend> |
<asp:SqlDataSource ID="AssignedKitDetailsDataSource" ConnectionString="<%$ ConnectionStrings:SLManagerConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="SELECT PartNum, Description, Qty FROM SLM_Parts where KitID = @RecId" runat="server"> |
<SelectParameters> |
<asp:ControlParameter ControlID="RecID" PropertyName="Text" Type="String" Name="RecId" /> |
</SelectParameters> |
</asp:SqlDataSource> |
<VPC:RadGrid ID="assignedNestedKitGrid" Width="100%" GridLines="None" AutoGenerateColumns="false" EnableEmbeddedSkins="false" Skin="SonyGrid" DataSourceID="AssignedKitDetailsDataSource" runat="server"> |
<ClientSettings /> |
<MasterTableView> |
<Columns> |
<VPC:GridBoundColumn DataField="PartNum" UniqueName="PartNum" ItemStyle-Width="20%" /> |
<VPC:GridBoundColumn DataField="Description" UniqueName="Description" ItemStyle-Width="68%" /> |
<VPC:GridBoundColumn DataField="Qty" UniqueName="Qty" ItemStyle-Width="12%" /> |
</Columns> |
</MasterTableView> |
</VPC:RadGrid> |
</fieldset> |
</NestedViewTemplate> |
</VPC:GridTableView> |
</DetailTables> |
<Columns> |
<VPC:GridBoundColumn DataField="AssignedUser" UniqueName="AssignedUser" ItemStyle-Width="50%" /> |
<VPC:GridTemplateColumn DataField="Quantity" UniqueName="QuantityColumn" ItemStyle-Width="50%"> |
<ItemTemplate> |
<%# Eval("Quantity") %> Kit(s) |
<asp:Label ID="UserIdentity" Text='<%# Eval("AssignedUser") %>' Visible="false" runat="server" /> |
</ItemTemplate> |
</VPC:GridTemplateColumn> |
</Columns> |
</MasterTableView> |
</VPC:RadGrid> |
Thank you!