I have a grid:
@(Html.Kendo().Grid(Model.Lines)
.Name("lines")
.Columns(columns =>
{
columns.Bound(p => p.Item).ClientTemplate("#= (Item.Name) ? Item.Name : '' #");
columns.Command(command => command.Destroy());
})
.ToolBar(tools =>
{
tools.Excel();
tools.Pdf();
tools.Save().HtmlAttributes(new { style = "float:right" });
tools.Create().HtmlAttributes(new { style = "float:right" });
})
.AllowCopy(true)
.Excel(excel => excel.FileName("LinesExport.xlsx"))
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Navigatable()
.Sortable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(i => i.Id);
model.Field(i => i.Id).Editable(false);
model.Field(i => i.ItemId).Editable(false);
model.Field(i => i.Item).Editable(true).DefaultValue(new Item { ItemId = "", ItemGroup = "", Name = "", SearchName = "" });
})
.Batch(true)
.ServerOperation(false)
)
)
with a custom editor on a field:
@model Item
@(Html.Kendo().MultiColumnComboBoxFor(m => m)
.Placeholder("Select item")
.DataTextField("Name")
.DataValueField("ItemId")
.Columns(columns =>
{
columns.Add().Field("ItemId").Title("Item Number").Width("180px");
columns.Add().Field("Name").Title("Name").Width("180px");
columns.Add().Field("SearchName").Title("Search Name").Width("180px");
columns.Add().Field("ItemGroup").Title("Item Group").Width("180px");
})
.Filter(FilterType.Contains)
.FooterTemplate("Total #: instance.dataSource.total() # items found")
.Height(400)
//.Events(events => events.Change("onComboBoxChange"))
.DataSource(source => source
.Read(read =>
{
read.Action("GetItems", "Home").Data("getItemsData");
})
.ServerFiltering(false)
)
.CascadeFrom("CustomerId")
)
The custom editor displays correctly for the Item field. When Customer changes (happens elsewhere) it is cascading properly and the read action is getting called. The read action is returning results (can see this by inspecting the result in the RequestEnd event) but no results are actually displayed in the MultiColumnComboBox. I have another MultiColumnComboBox elsewhere on the page that is not in the grid that cascades from the same value and does an almost identical lookup and it works fine.
What am I missing here? or is this a bug and if so how do I work around it?