Hi,
I'm not able to get Ajax binding to work with my combobox. I went the Kendo Ajax binding example to the letter. The combox box returns 'undefined' in the results. I verified that the controller method is called.
Controller:
View:
I'm not able to get Ajax binding to work with my combobox. I went the Kendo Ajax binding example to the letter. The combox box returns 'undefined' in the results. I verified that the controller method is called.
Controller:
public
JsonResult GetContainers()
{
List<Container> containers =
new
List<Container>();
containers.Add(
new
Container() { ContainerId = 1, ContainerName =
"Container1"
});
containers.Add(
new
Container() { ContainerId = 2, ContainerName =
"Container2"
});
return
Json(containers);
}
@(Html.Kendo().ComboBox()
.Name("TestContainerName")
.DataTextField("ContainerName")
.DataValueField("ContainerId")
.Filter(FilterType.Contains)
.DataSource(dataSource =>
{
dataSource.Read(read =>
{
read.Action("GetContainers", "Common");
});
})
.SelectedIndex(0)
)