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

dropdown list not working

1 Answer 1453 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
mww
Top achievements
Rank 1
mww asked on 09 Jan 2013, 01:38 PM
I cant get a dropdown list to work, this is the first time Ive used kendo and as far as im aware Im using it correctly but I cant get the dropdown list to show.  Heres the code

<li>
               @Html.LabelFor(m => m.UserRole)
               @Html.Kendo().DropDownListFor(m => m.UserRole).BindTo(Model.UserRoles).AutoBind(true).SelectedIndex(0)
           </li>

Model.UserRoles is populated with 3 items.  Firebug console is showing this error

TypeError: jQuery("#UserRole").kendoDropDownList is not a function


and this is the HTML rendered

<li>
<label for="UserRole">User role</label>
<input id="UserRole" type="text" name="UserRole" data-val-required="The User role field is required." data-val="true">
<script>
jQuery(function(){jQuery("#UserRole").kendoDropDownList({"dataSource":["Agency","Artist","Venue"],"autoBind":true,"index":0});});
</script>
</li>
 can anyone tell me where Im going wrong ?

1 Answer, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 11 Jan 2013, 11:56 AM
Hello Mark,

The most likely reason for this error is lack of some of the needed resources or incorrect order. Please check if everything is correctly included.
 
Kind regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
DropDownList
Asked by
mww
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Share this question
or