User1525433465 posted
Hi,
Set the Name property for the Detail table and hence you can access the DropDownlist from the Detail table in the ItemDataBound event as shown below.
ASPX:
<DetailTables >
<rad:GridTableView runat="server" Name="Detail" DataSourceID="SqlDataSource1" >
<Columns>
<rad:GridTemplateColumn UniqueName="TempCol" HeaderText="TempCol" >
<ItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server">
</asp:DropDownList>
</ItemTemplate>
</rad:GridTemplateColumn>
</Columns>
</rad:GridTableView>
</DetailTables>
CS:
protected void RadGrid1_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
{
if ((e.Item is GridDataItem)&&(e.Item.OwnerTableView.Name=="Detail"))
{
GridDataItem item = (GridDataItem)e.Item;
DropDownList ddl = (DropDownList)item["TempCol"].FindControl("DropDownList1");
// code to populate the DropDownList
}
}
Regards
Shinu [:)]