protected void rgdTestPlan_DetailTableDataBind(object sender, Telerik.Web.UI.GridDetailTableDataBindEventArgs e)
{
GridDataItem parentItem = e.DetailTableView.ParentItem as GridDataItem;
if (parentItem.Edit)
{
return;
}
GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
if (e.DetailTableView.Name == "TestPlanList")
{
e.DetailTableView.DataSource = 'myDataTable'
}
}
ASPX
<telerik:RadGrid ID="rgdTestPlan" GridLines="None" Skin="Web20" AllowMultiRowSelection="false" AllowMultiRowEdit="false" runat="server"
AutoGenerateEditColumn="false" OnItemCreated="rgdTestPlan_ItemCreated" OnNeedDataSource="rgdTestPlan_NeedDataSource"
OnUpdateCommand="rgdTestPlan_OnUpdateCommand" on OnDetailTableDataBind="rgdTestPlan_DetailTableDataBind" OnCancelCommand="rgdTestPlan_OnCancelCommand" OnSortCommand="rgdTestPlan_OnSortCommand"
OnItemDataBound="rgdTestPlan_ItemDataBound"
ShowStatusBar="true" AllowPaging="true" >
<PagerStyle Mode="NextPrevNumericAndAdvanced" EnableSEOPaging="false"></PagerStyle>
<HeaderContextMenu EnableTheming="True"><CollapseAnimation Duration="200" Type="OutQuint" /></HeaderContextMenu>
<PagerStyle Mode="NextPrevNumericAndAdvanced" EnableSEOPaging="false"></PagerStyle>
<HeaderContextMenu EnableTheming="True"><CollapseAnimation Duration="200" Type="OutQuint" /></HeaderContextMenu>
<MasterTableView AutoGenerateColumns="False" EditMode="InPlace" Name="TestSpecList" AllowNaturalSort="false" DataKeyNames="MasterSpecId" CommandItemDisplay="None">
<DetailTables>
<telerik:GridTableView DataKeyNames="TestPlanId" Name="TestPlanList" Width="100%" runat="server">
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="/Img/Using/GridEdit.gif" UniqueName="EditCommandColumn"><ItemStyle CssClass="MyImageButton" /></telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="TestPlanId" HeaderText="TestPlanId" SortExpression="TestPlanId" UniqueName="TestPlanId" Visible="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PlatformMasterSpecId" HeaderText="PlatformMasterSpecId" SortExpression="PlatformMasterSpecId" UniqueName="PlatformMasterSpecId" Visible="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ContainerId" HeaderText="ContainerId" SortExpression="ContainerId" UniqueName="ContainerId" Visible="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ParamLimitId" HeaderText="ParamLimitId" SortExpression="ParamLimitId" UniqueName="ParamLimitId" Visible="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TestJobId" HeaderText="TestJobId" SortExpression="TestJobId" UniqueName="TestJobId" Visible="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ContainerName" HeaderText="Container" SortExpression="ContainerName" UniqueName="ContainerName" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PlanLevel" HeaderText="Plan Level" SortExpression="PlanLevel" UniqueName="PlanLevel" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Priority" HeaderText="Priority" SortExpression="Priority" UniqueName="Priority" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ForwardTestPlanId" HeaderText="Symbol Feed Forward" SortExpression="ForwardTestPlanId" UniqueName="ForwardTestPlanId" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TestPlanStatus" HeaderText="Test Plan Status" SortExpression="TestPlanStatus" UniqueName="TestPlanStatus" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TestJobName" HeaderText="Test Job Name" SortExpression="TestJobName" UniqueName="TestJobName" Visible="true"></telerik:GridBoundColumn>
</Columns>
<%
--<SortExpressions>
<telerik:GridSortExpression FieldName="PlanLevel"></telerik:GridSortExpression>
<telerik:GridSortExpression FieldName="ContainerName"></telerik:GridSortExpression>
</SortExpressions>--
%>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" EditImageUrl="/Img/Using/GridEdit.gif" UniqueName="EditCommandColumn"><ItemStyle CssClass="MyImageButton" /></telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="UniqueGridId" HeaderText="UniqueGridId" UniqueName="UniqueGridId" Visible="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MasterSpecId" HeaderText="MasterSpecId" SortExpression="MasterSpecId" UniqueName="MasterSpecId" Visible="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FuncBlock" HeaderText="Functional Block" SortExpression="FuncBlock" UniqueName="FuncBlock" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Param" HeaderText="Parameter" SortExpression="Param" UniqueName="Param" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Symbol" HeaderText="Symbol" SortExpression="Symbol" UniqueName="Symbol" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Cond" HeaderText="Condition" SortExpression="Cond" UniqueName="Cond" Visible="true"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TestType" HeaderText="TestType" SortExpression="Test Type" UniqueName="TestType" Visible="true"></telerik:GridBoundColumn>
<telerik:GridDropDownColumn DataField="Priority" HeaderText="Priority" SortExpression="Priority" UniqueName="Priority" Visible="true"></telerik:GridDropDownColumn>
<telerik:GridDropDownColumn DataField="ForwardTestPlanId" HeaderText="Symbol Feed Forward" SortExpression="ForwardTestPlanId" UniqueName="ForwardTestPlanId" Visible="true"></telerik:GridDropDownColumn>
</Columns>
<EditFormSettings UserControlName="TestSpec_Entry.ascx" EditFormType="WebUserControl">
<EditColumn UniqueName="EditTestSpec"></EditColumn>
</EditFormSettings>
</MasterTableView>
<clientsettings>
<Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="false"></Scrolling>
<selecting allowrowselect="True" />
</clientsettings>
<FilterMenu EnableTheming="True">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>