We're using the MultiColumnComboBox with a Custom-Datasource to utilize the ServerFiltering and ServerFiltering functionality.
Now we also want to sort the data. We're using ServerSorting + Sort, and the data is sorted correctly.
Unfortunately the Combobox picks the wrong records now, as if picking the page and record before applying the sorting.
Are we doing something wrong?
This is how our MultiColumnCombobox is set up:
@(Html.Kendo().MultiColumnComboBoxFor(model => model.KUNDE_ID)
.Columns(columns =>
{
columns.Add().Field("ADR_NR_CHAR").Title("Kundennummer").Width("150px");
columns.Add().Field("adr_name1").Title("Kundenname").Width("200px");
columns.Add().Field("adr_name2").Title("Kundenname 2").Width("200px");
columns.Add().Field("adr_strasse").Title("Strasse").Width("200px");
columns.Add().Field("adr_plz").Title("PLZ").Width("100px");
columns.Add().Field("adr_ort").Title("Ort").Width("200px");
columns.Add().Field("ntv_kz_d").Title("Land").Width("100px");
})
.DataValueField("ID")
.DataTextField("adr_name1")
.DataSource(source =>
{
source.Custom()
.ServerSorting(true)
.Sort(s => s.Add("adr_name1").Ascending())
.ServerFiltering(true)
.ServerPaging(true)
.PageSize(50)
.Type("aspnetmvc-ajax")
.Transport(transport =>
{
transport.Read("ReadCustomers", "Box");
})
.Schema(schema =>
{
schema.Data("Data").Total("Total");
});
})
.Filter(FilterType.Contains)
.FilterFields(new string[] { "ADR_NR_CHAR", "adr_name1", "adr_name2", "adr_strasse", "adr_plz", "adr_ort", "ntv_kz_d" })
.HtmlAttributes(new { @class = "form-control", style = "width:100%;" })
.Messages(m => m.NoData("Keine Daten gefunden").Clear("Leeren"))
.Virtual(v => v.ItemHeight(33).ValueMapper("valueMapper"))
)