Hi,
I am using Kendo.Mvc 2015.1.408.545
How can I use TypeScript / jQuery to set the values on a MultiSelect when Ajax and ServerFiltering are used as the DataSource? I know the value and text as they have been saved to the database previously. How can I set the values? This is before user has used the MultiSelect to retrieve data using server filtering.
@(form.FormGroup().CustomControls(
Html.Kendo().MultiSelectFor(x => x.PKeys)
.HtmlAttributes(new { tabindex = "5" })
.Deferred()
.Name("pMultiSelect")
.AutoBind(false)
.DataTextField("Name")
.DataValueField("PKey")
.Filter(FilterType.StartsWith)
.MinLength(2)
.Placeholder("[All]")
.DataSource(source =>
{
source.Read(read => read.Action("AjaxFilterSearch", "P")
.Data("pMultiSelectReadData"));
source.ServerFiltering(true);
})
).LabelFor(x => x.PKeys))
I have tried JSON, string arrays, strings, using the MultiSelect.value() will not display what is in "Name" field.
Thanks very much