Using version 2012.3.1114.
This work using Visual Studio Development Server but does not show the drop down using IIS Express or IIS 7 on Windows Server 2008 R2
Code in view:
@(Html.Kendo().ComboBoxFor(m => m.ForPost)
.Filter(FilterType.StartsWith)
.DataTextField("label")
.DataValueField("value")
.MinLength(1)
.DataSource(source => {
source.ServerFiltering();
source.Read(read => {
read.Action("AjaxPost", "Home"); //Set the Action and Controller name
read.Type(HttpVerbs.Post);
});
}))
[HttpPost]
public ActionResult AjaxPost(string text) {
if (string.IsNullOrWhiteSpace(text)) return Json(null);
var x = Data.Where(d => d.StartsWith(text, StringComparison.InvariantCultureIgnoreCase))
.Select(d => new { label = d, value = d }).ToList();
return Json(x);
}
IE 9 in Javascript debug it shows this error "Microsoft JScript runtime error: Unable to get value of the property 'Errors': object is null or undefined" and pints the this dynamic code.
function anonymous(d) {
return d.Errors
}
Using get works fine but our security people insist we use post for ajax.
Thanks,
Tom Wilkinson