I've got a ComboBox which uses Grouping and I'm having trouble setting the selected item:
@(Html.Kendo().ComboBox()
.Name("GroupedList")
.Placeholder("Select...")
.DataValueField("Value")
.DataTextField("Text")
.MinLength(3)
.Filter("contains")
.HtmlAttributes(new { style = "width:100%;" })
.Height(400)
.DataSource(source => source
.Custom()
.Group(g => g.Add("GroupKey", typeof(string)))
.Transport(transport => transport
.Read(read =>
{
read.Action("GetMyItems", "MyController");
})
)
.ServerFiltering(false)
)
)
My controler is returning JSON in the following format with one of the items optionally having "Selected":true
[{"GroupKey":"Address","GroupName":"Address","Selected":false,"Text":"Correspondence Post Code","Value":"821"},...etc..]