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

[Solved] 'Object must Implement IConvertible' when creating DropDownList

0 Answers 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jose
Top achievements
Rank 1
Jose asked on 29 Apr 2011, 10:19 PM
Hello,

I have the following code:

 

 

 

 

 

@

 

using Telerik.Web.Mvc.UI

 

 

@{

 

Layout =

 

null;

 

 

}

 

@( Html.Telerik().DropDownList()

 

.Name(

 

"AUSStatus")

 

 

.BindTo((

 

SelectList)ViewBag.AUSStatus)

 

 

 

 

//.SelectedIndex(1)

 

)


where ViewBag.AUSStatus is a SelectList, but I get the exception described in the title. Furthermore, even if i comment out the line that does the databind, I get the same error.

 

 

 

 

 

 

 

@

 

using Telerik.Web.Mvc.UI

 

 

@{

 

Layout =

 

null;

 

 

}

 

@( Html.Telerik().DropDownList()

 

.Name(

 

"AUSStatus")

 

 

//.BindTo((SelectList)ViewBag.AUSStatus)

 

 

 

 

 

//.SelectedIndex(1)

 

)



Any help will be greatly appreciated.

Thank you

 

 

 

 

 

 

 

Tags
General Discussions
Asked by
Jose
Top achievements
Rank 1
Share this question
or