I'm in front of a strange problem with 2 kendo cascading dropdownlist :
First dropdown : it's a list of countries, user can write and can be helped with autocomplete (Filter(FilterType.StartsWith) and IgnoreCase(true)) It works perfectly
Second dropdown : it's a list of all the cities of the selected country (from the first dropdownlist). Same configuration as the first: (Filter(FilterType.StartsWith) and IgnoreCase(true)) The filter and ignorecase doesn't works, when I wrote in the dropdown I have a "Contains" filter and case sensitive, the default values...
Here is my code :
<span>Country:</span>
@(Html.Kendo().ComboBox()
.Name("countries")
.DataTextField("CountryName")
.DataValueField("CountryId")
.Filter(FilterType.StartsWith)
.IgnoreCase(true)
.Placeholder("Select a country...")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetCascadeCountries", "Home");
});
})
)
<span>City:</span>
@(Html.Kendo().ComboBox()
.Name("cities")
.DataTextField("CityName")
.DataValueField("CityId")
.Filter(FilterType.StartsWith)
.IgnoreCase(true)
.Placeholder("Select a city...")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetCascadeCities", "Home")
.Data("filterCities");
})
.ServerFiltering(true);
})
.Enable(false)
.AutoBind(false)
.CascadeFrom("countries")
)
<script>
function filterCities() {
return {
brands: $('#countries').val(),
cityFilter: $('#cities').data('kendoComboBox').input.val()
};
}
</script>
Anyone can help me ? Maybe I forgot something...