<RadGrid
ID="m_rgMain" runat="server" Width="100%" AllowFilteringByColumn="false" OnNeedDataSource="m_rgMain_NeedDataSource"
OnItemCommand="m_rgMain_ItemCommand" OnItemDataBound="m_rgMain_ItemDataBound" >
<MasterTableView DataKeyNames="WmTaskId" HierarchyDefaultExpanded="true">
<Columns>
<telerik:GridButtonColumn UniqueName="EditButton" ButtonType="ImageButton" CommandName="Edit"
Text="View / Edit Task" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20px">
</telerik:GridButtonColumn>
<telerik:GridButtonColumn UniqueName="ViewButton" ButtonType="ImageButton" ImageUrl="View.png"
CommandName="View" Text="View Entity" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20px" />
<telerik:GridBoundColumn SortExpression="WmTaskId" HeaderText="Id"
HeaderButtonType="TextButton" DataField="WmTaskId" AllowFiltering="false">
<ItemStyle Width="50" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="PrioritySequence" HeaderText="Priority" HeaderButtonType="TextButton"
DataField="PrioritySequence" >
<ItemStyle Width="50" />
</telerik:GridBoundColumn>
. . . other columns here
</Columns>
<EditFormSettings EditFormType="Template">
<FormTemplate>
<table class="FormTable" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td class="FormLabelCell">
<tst:TstLiteral runat="server" ID="litRole" Text="Role:"></tst:TstLiteral><br />
<tst:TstLabel runat="server" ID="lblRole"></tst:TstLabel>
</td>
</tr>
<tr>
<td class="FormFooterCell" colspan="7">
<RadGrid ID="rgCompany" runat="server" Width="99%" ShowStatusBar="true"
AutoGenerateColumns="False" AllowMultiRowSelection="False"
GridLines="None" OnNeedDataSource="rgCompany_NeedDataSource">
<MasterTableView Width="100%" DataKeyNames="CompanyId" AllowMultiColumnSorting="True">
<Columns>
<telerik:GridBoundColumn HeaderText="ID" HeaderButtonType="TextButton"
DataField="CompanyId">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Name" HeaderButtonType="TextButton"
DataField="CompanyShortName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="Phone" HeaderButtonType="TextButton"
DataField="CompanyPhoneNumber">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</RadGrid>
</td>
</tr>
</table>
</FormTemplate>
</EditFormSettings>
</MasterTableView>
</Rad
Grid>
In the edit form template, I want to show the companies associated with my taskId as information to the user editing the task info.
I can can get the EditFormTempalte at ItemDataBound time, then get the company RadGrid using FindControl and call its Rebind().
However, in the rgCompany.NeedDataSource event (which does fire), I can't get back to :
A) the parent grid to get the key for which to drive my look up of the associated company data and
B) I can't get a reference to the rgCompany grid so as to set the datasource to my company result set.
Is this possible and if so, can you provide the details of how to do it?
Thanks.

AllowFilteringByColumn
="True"