Hi,
We have a page with several combobox's and due to the delay from them all AutoBinding the page loads with the numeric value displaying inside the textbox and is only replaced by the text after the bind. Is there a way to set an initial data binding while still attaching the read method to load server filtered alternatives via Ajax? This way the page will display the text on load, and avoid multiple simultaneous ajax requests.
For example here is some failed code I've tried to give you some idea of what I would like.
@(Html.Kendo().ComboBoxFor(x => x.List[i].ID)
.DataTextField("Name")
.DataValueField("ID")
.Filter(FilterType.StartsWith)
.MinLength(3)
.BindTo(new List<ItemDTO>(){
new ItemDTO(){
ID = Model.List[i].ID,
Name = Model.List[i].Name
}
})
.AutoBind(false)
.DataSource(ds =>
{
ds.Read(r => r.Action("Action", "Controller").Data("filter")).ServerFiltering(true);
})
.Events(e => e.Change("Change"))
)
Thanks,
Kevin
We have a page with several combobox's and due to the delay from them all AutoBinding the page loads with the numeric value displaying inside the textbox and is only replaced by the text after the bind. Is there a way to set an initial data binding while still attaching the read method to load server filtered alternatives via Ajax? This way the page will display the text on load, and avoid multiple simultaneous ajax requests.
For example here is some failed code I've tried to give you some idea of what I would like.
@(Html.Kendo().ComboBoxFor(x => x.List[i].ID)
.DataTextField("Name")
.DataValueField("ID")
.Filter(FilterType.StartsWith)
.MinLength(3)
.BindTo(new List<ItemDTO>(){
new ItemDTO(){
ID = Model.List[i].ID,
Name = Model.List[i].Name
}
})
.AutoBind(false)
.DataSource(ds =>
{
ds.Read(r => r.Action("Action", "Controller").Data("filter")).ServerFiltering(true);
})
.Events(e => e.Change("Change"))
)
Thanks,
Kevin