We are using the below code for loading data in a Kendo dropdown inside a grid. The data is getting loaded, but after applying filter and selecting an item in the filter only the filter data is displayed in the dropdown. The dropdown is not getting refreshed to load the entire data. Please help
@(Html.Kendo().DropDownList()
.Name("VehicleSegment") // The name of the widget
should be the same as the name of the property.
.DataValueField("VehicleSegmentID") // The value of the dropdown
is taken from the ID property.
.DataTextField("VehicleSegmentName") // The text of the items is
taken from the EmployeeName property.
.MinLength(3)
//.OptionLabel("---Select Vehicle
Segment ---")
.HtmlAttributes(new { style = "width:100%" })
.Template("#= VehicleSegmentID # | For: #= VehicleSegmentName
#")
.Height(290)
//.Filter(FilterType.Contains)
.Filter("contains")
.DataSource(source =>
{
source.Custom()
.ServerFiltering(true)
.ServerPaging(true)
.PageSize(80)
.Type("aspnetmvc-ajax") //Set this type if you want
to use DataSourceRequest and ToDataSourceResult instances
.Transport(transport =>
{
transport.Read("Virtualization_Read", "Program");
})
.Schema(schema =>
{
schema.Data("Data") //define the [data](http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.data)
option
.Total("Total"); //define the [total](http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.total)
option
});
})
.Virtual(v => v.ItemHeight(20).ValueMapper("valueMapper"))