I need to show list of questions in grid and their answers in details view when a person expnads question item. Below is how I set datasource of radGrid. How can i set the datasource of nested details grid now?
protected void ShowQuestions()
{
try
{
this.radGridQuestions.DataSource = this.questions;
}
catch
{
}
}
<
tk:RadGrid ID="radGridQuestions" runat="server" AutoGenerateColumns="False" ShowHeader="false" GridLines="None">
<MasterTableView DataKeyNames="Id">
<Columns>
<tk:GridTemplateColumn>
<ItemTemplate>
<table>
<tr>
<td style="width: 30px; vertical-align: top;">
<img src="<%# PostStatusImage(Container.DataItem)%>" alt="PostStatus" />
</td>
<td style="vertical-align: top;">
<asp:LinkButton ID="lbViewQuestion" runat="server" Text='<%# Eval("Title") %>' CommandArgument='<%# Eval("Id") %>'
CommandName="ViewQuestion"></asp:LinkButton> Posted On: <%# Eval("PostedDate") %>
</td>
</tr>
</table>
</ItemTemplate>
</tk:GridTemplateColumn>
</Columns>
<DetailTables>
<tk:GridTableView runat="server" DataKeyNames="Id">
<ParentTableRelation>
<tk:GridRelationFields DetailKeyField="ParentThreadId" MasterKeyField="Id" />
</ParentTableRelation>
<DetailTables>
</DetailTables>
</tk:GridTableView>
</DetailTables>
</MasterTableView>
</tk:RadGrid>