This is a migrated thread and some comments may be shown as answers.

why cant I find a raddropdown using FindControl?

2 Answers 76 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
john
Top achievements
Rank 1
john asked on 29 Aug 2008, 05:56 PM
I try to get a reference to a Rad combobox inside a Formview control and always get the error that the object  reference is not set
this is what I use:

Dim SelectAdSubCat As Telerik.Web.UI.RadComboBox = CType(formview1.FindControl("selectadsubcat"), Telerik.Web.UI.RadComboBox)

I am probably doing something wrong but what?

thank you

2 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 01 Sep 2008, 08:12 AM
Hello john,

You can check this code library: Using RadComboBox in FormView

Regards,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
john
Top achievements
Rank 1
answered on 02 Sep 2008, 09:00 PM
which library should I import cause neither the RadComboBox nor the RadComboBoxItem names are recognized in my code

as in this:

Dim

firstItem As RadComboBoxItem = New RadComboBoxItem("Select an Ad Heading", "0")

SubcatSelect.Items.Insert(0, firstItem)


or this dim rad as radcombobox

do not work for me!
Tags
ComboBox
Asked by
john
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
john
Top achievements
Rank 1
Share this question
or