Trying to access an <asp:dropdownlist> from <telerik:GridTemplateColumn> in the ItemCommand event of a RadGrid.
BarID is the unique column name on the template column
ddlBarID is the id of the dropdownload
GridEditFormItem editedItem =
(GridEditFormItem)((GridDataItem)e.Item).EditFormItem;
DropDownList ddlBar =
(DropDownList)editedItem["BarID"].FindControl("ddlBarID");
Label1.Text = "BarID null: " + (ddlBar == null).ToString();
ddlBar.Items.Add("TEST");
I get Object reference not set to an instance of an object.
any help is appreciated. been banging my head on this one for two days now.