I'm using Razor. Here is an example that displays the problem using version 2015.3.930 (tested with IE10 and latest Firefox and Chrome).
View:
@(Html.Kendo().Grid<TelerikMvc5App1.Models.TestDataModel>()
.Name(
"Grid"
)
.Columns(columns =>
{
columns.Bound(e => e.FirstName);
columns.Bound(e => e.LastName);
columns.Bound(e => e.State)
.Filterable(filterable => filterable.UI(
"stateFilterUsingModel"
));
})
.Filterable(filterable => filterable
.Extra(
false
)
.Operators(operators => operators
.ForString(str => str
.Clear()
.StartsWith(
"Starts with"
)
.IsEqualTo(
"Is equal to"
)
.IsNotEqualTo(
"Is not equal to"
)
)
)
)
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action(
"TestData_Read"
,
"FilterMenuCustomization"
))
)
)
<script type=
"text/javascript"
>
function stateFilterUsingModel(element) {
element.kendoDropDownList({
dataTextField:
"Name"
,
dataValuefield:
"Name"
,
dataSource: {
transport: {
read:
"@Url.Action("
FilterMenuCustomization_StatesUsingModel
")"
}
},
optionLabel:
"--Select Value--"
});
}
</script>
Controller:
namespace
Kendo.Mvc.Examples.Controllers
{
public
class
FilterMenuCustomizationController : Controller
{
public
ActionResult Index()
{
return
View();
}
public
ActionResult TestData_Read([DataSourceRequest] DataSourceRequest request)
{
var list =
new
List<TestDataModel>();
list.Add(
new
TestDataModel {
FirstName =
"Jane"
,
LastName =
"Doe"
,
State =
"Oregon"
});
list.Add(
new
TestDataModel {
FirstName =
"John"
,
LastName =
"Doe"
,
State =
"Oregon"
});
list.Add(
new
TestDataModel
{
FirstName =
"Jimmy"
,
LastName =
"John"
,
State =
"Washington"
});
return
Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
public
ActionResult FilterMenuCustomization_StatesUsingModel()
{
var list =
new
List<TestLookupModel>();
list.Add(
new
TestLookupModel(
"Oregon"
));
list.Add(
new
TestLookupModel(
"Washington"
));
list.Add(
new
TestLookupModel(
"Idaho"
));
list.Add(
new
TestLookupModel(
"California"
));
list.Add(
new
TestLookupModel(
"Nevada"
));
return
Json(list, JsonRequestBehavior.AllowGet);
}
}
}
Model:
namespace
TelerikMvc5App1.Models
{
public
class
TestLookupModel
{
public
TestLookupModel(
string
name)
{
Name = name;
}
public
string
Name {
get
;
set
; }
}
}