Hi,
I have a RadGrid (parent) which is having another radGrid (child) inside the NestedViewTemplate.
I am providing the datasource of parent from code behind need datasource.
How can I bind the child radgrid from codebehind based upon the a column/datakey value of the parent grid?
In below code I have to fill the child grid with the values sent by OAHSSQ column.
<telerik:RadGrid ID="radGridShippedOrders" runat="server" GridLines="None" AllowPaging="True"
PageSize="10" AllowSorting="True" AutoGenerateColumns="false" ShowStatusBar="true"
HorizontalAlign="NotSet" AllowMultiRowEdit="false" OnNeedDataSource="radGridShippedOrders_NeedDataSource"
OnItemDataBound="radGridShippedOrders_ItemDataBound" OnItemCommand="radGridShippedOrders_OnItemCommand"
Width="800px" AllowMultiRowSelection="False" AllowFilteringByColumn="true" ShowGroupPanel="True">
<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
<ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
<Pdf PageTitle="Shipped Orders" />
</ExportSettings>
<MasterTableView GroupLoadMode="Client" CommandItemDisplay="Bottom" DataKeyNames="OAHSSQ" Name="MTVShippedOrders">
<CommandItemTemplate>
<asp:Button ID="DownloadPDF" runat="server" CommandName="ExportToPdf" Text="Export" />
</CommandItemTemplate>
<CommandItemSettings ShowExportToExcelButton="true" />
<Columns>
<telerik:GridBoundColumn UniqueName="OACONO" HeaderText="OACONO" DataField="OACONO">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="OAINNO" HeaderText="OAINNO" DataField="OAINNO">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="OAORNO" HeaderText="OAORNO" DataField="OAORNO">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="OAORGN" HeaderText="OAORGN" DataField="OAORGN">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="OAHSSQ" HeaderText="OAHSSQ" DataField="OAHSSQ">
</telerik:GridBoundColumn>
</Columns>
<NestedViewTemplate>
<telerik:RadGrid ID="radGridInvoiceHeader" runat="server" GridLines="None" AllowPaging="True"
PageSize="20" AllowSorting="True" AutoGenerateColumns="true" ShowStatusBar="true"
HorizontalAlign="NotSet" AllowMultiRowEdit="false"
Width="100%" AllowMultiRowSelection="False" AllowFilteringByColumn="false">
<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
</telerik:RadGrid>
</NestedViewTemplate>
</MasterTableView>
<ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowDragToGroup="True"
AllowColumnsReorder="True">
</ClientSettings>
<GroupingSettings ShowUnGroupButton="true" />
</telerik:RadGrid>
I have a RadGrid (parent) which is having another radGrid (child) inside the NestedViewTemplate.
I am providing the datasource of parent from code behind need datasource.
How can I bind the child radgrid from codebehind based upon the a column/datakey value of the parent grid?
In below code I have to fill the child grid with the values sent by OAHSSQ column.
<telerik:RadGrid ID="radGridShippedOrders" runat="server" GridLines="None" AllowPaging="True"
PageSize="10" AllowSorting="True" AutoGenerateColumns="false" ShowStatusBar="true"
HorizontalAlign="NotSet" AllowMultiRowEdit="false" OnNeedDataSource="radGridShippedOrders_NeedDataSource"
OnItemDataBound="radGridShippedOrders_ItemDataBound" OnItemCommand="radGridShippedOrders_OnItemCommand"
Width="800px" AllowMultiRowSelection="False" AllowFilteringByColumn="true" ShowGroupPanel="True">
<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
<ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
<Pdf PageTitle="Shipped Orders" />
</ExportSettings>
<MasterTableView GroupLoadMode="Client" CommandItemDisplay="Bottom" DataKeyNames="OAHSSQ" Name="MTVShippedOrders">
<CommandItemTemplate>
<asp:Button ID="DownloadPDF" runat="server" CommandName="ExportToPdf" Text="Export" />
</CommandItemTemplate>
<CommandItemSettings ShowExportToExcelButton="true" />
<Columns>
<telerik:GridBoundColumn UniqueName="OACONO" HeaderText="OACONO" DataField="OACONO">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="OAINNO" HeaderText="OAINNO" DataField="OAINNO">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="OAORNO" HeaderText="OAORNO" DataField="OAORNO">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="OAORGN" HeaderText="OAORGN" DataField="OAORGN">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="OAHSSQ" HeaderText="OAHSSQ" DataField="OAHSSQ">
</telerik:GridBoundColumn>
</Columns>
<NestedViewTemplate>
<telerik:RadGrid ID="radGridInvoiceHeader" runat="server" GridLines="None" AllowPaging="True"
PageSize="20" AllowSorting="True" AutoGenerateColumns="true" ShowStatusBar="true"
HorizontalAlign="NotSet" AllowMultiRowEdit="false"
Width="100%" AllowMultiRowSelection="False" AllowFilteringByColumn="false">
<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
</telerik:RadGrid>
</NestedViewTemplate>
</MasterTableView>
<ClientSettings AllowGroupExpandCollapse="True" ReorderColumnsOnClient="True" AllowDragToGroup="True"
AllowColumnsReorder="True">
</ClientSettings>
<GroupingSettings ShowUnGroupButton="true" />
</telerik:RadGrid>