MVC Kendo网格自定义过滤器 [英] MVC Kendo Grid Custom Filter
问题描述
基本上,我正在寻找此演示的MVC版本:
http://demos.telerik.com/kendo-ui/grid/filter-menu-customization [ ^ ]
这是什么我目前有
Basically, I am looking for the MVC version of this demo:
http://demos.telerik.com/kendo-ui/grid/filter-menu-customization[^]
Here is what I currently have
.Columns(columns =>
{
columns.Bound(e => e.ID)
.Hidden();
columns.Bound(e => e.SearchFunctionCode)
.Hidden();
columns.Bound(e => e.SearchFunctionDesc)
.Title("Search Function")
.Filterable( *** WHAT GOES HERE? *** )
.HtmlAttributes(new { style = "text-align: center" })
.HeaderHtmlAttributes(new { style = "text-align: center" });
我还引用javascript吗?
Do I still reference the javascript?
<script type="text/javascript">
function SearchFunctionFilter(element) {
element.kendoDropDownList({
dataSource: searchfunctions(),
optionLabel: "--Select Value--"
});
}
</script>
我希望将一个特定的列过滤掉。我想将列选项(编辑/添加时)限制为过滤器中可用的元素。我还在研究,但我想我需要使用带有新编辑器模板的UIHint和Html.DropDownListFor
I'm looking to make one specific column filterable. And I would like to limit the column options (when editing/adding) to the elements available in the filter. I'm still researching, but I think I need to use the UIHint with a new editor template, and a Html.DropDownListFor
推荐答案
.Filterable(f => f.Extra(false))
这篇关于MVC Kendo网格自定义过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!