Hi, I have the same problem and I'm very interested to know how to fix this. I cannot provide a runable project but I can give you the following information:
Here's the JSON object I caught with firebug: [{"salesgeoid":5,"shortname":"ALL"},{"salesgeoid":1,"shortname":"BRA"},{"salesgeoid":3,"shortname":"CHE"},{"salesgeoid":2,"shortname":"FRA"}]
Here's my view:
<
div
class
=
"editor-field"
>@(Html.Kendo().DropDownListFor(model => model.salesgeoid)
.Name("salesgeo")
.HtmlAttributes(new { style = "width:150px" })
.DataTextField("shortname")
.DataValueField("salesgeoid")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("SalesGeoList", "Profile");
});
}))</
div
>
And my controller:
public
JsonResult SalesGeoList()
{
return
Json(db.SalesGeo.Select(x =>
new
{ salesgeoid = x.salesgeoid, shortname = x.shortname }), JsonRequestBehavior.AllowGet);
}
Your help would be greatly appreciated.