Kendo UI Angular Grid复选框列表自定义过滤器
问题描述:
我想创建一个Kendo Angular网格控件在我的页面上用特定列上的复选框列表过滤器(列配置可过滤:{multi:true}没有帮助。)该列的值。我需要实现的自定义过滤器是一个复选框列表,如下面的连线框(现在只有第一列和过滤器是焦点)。 Kendo UI Angular Grid复选框列表自定义过滤器
列表中黄色突出显示的项目是过滤器项目。我没有看到任何开箱即用的功能来启用此功能。我已经尝试使用像下面的Kendo多选控件来实现这一点。
$scope.registryTypeFilter = function (element) {
var menu = $(element).parent();
menu.find(".k-filter-help-text").text("Show records for people working as:");
menu.find("[data-role=dropdownlist]").remove();
var multiSelect = element.kendoMultiSelect({
dataSource: _.uniq(_.pluck($scope.automationQueueItems.data(), 'RegistryType')),
itemTemplate: "<input type='checkbox' />(<label ng-bind='\'data.RegistryType\''></label>)",
tagTemplate:"$scope.dataItem"
}).data("kendoMultiSelect");
menu.find("[type=submit]").on("click", { widget: multiSelect }, filterByRegistryTypeAutomationQueue);
}
但多选择控制是不是需要什么。有没有人试过之前?
答
我使用的是旧版本2014.x.x.新版本2015.x.x支持可筛选:{multi:true}。升级到最新版本。那是我解决问题的方法。