Hi I am trying to add add a RadComboxBox to my RadGrid filtertemplate in a bound column. For some reason in the code behind I can not access the RadComboBox. It keeps coming back null. I'm not sure what I'm doing wrong. Here is my code.
<telerik:GridBoundColumn SortExpression="Product_Name" HeaderText="Product Name" DataField="Product_Name" UniqueName="ProductName">
<FilterTemplate>
<telerik:RadComboBox runat="server" ID="cmbProductName" CheckBoxes="true" ClientIDMode="Static"
AppendDataBoundItems="true" DataValueField="Product_Name" EnableCheckAllItemsCheckBox="true">
</telerik:RadComboBox>
</FilterTemplate>
</telerik:GridBoundColumn>
foreach (var cat in CatProdList)
{
var itemCategory = new RadComboBoxItem(cat.Category.Name);
var option = cat.ProdAttributesTuple.GroupBy(a => a.Item2.Attribute.Value).ToList();
foreach (var attr in option)
{
if (e.Item is GridDataItem)
{
RadComboBox cmbProductName = (RadComboBox)e.Item.FindControl("cmbProductName");
var item = new RadComboBoxItem(attr.Key);
cmbProductName.Items.Add(item);
}
}
}