【发布时间】:2015-12-22 04:45:47
【问题描述】:
我正在尝试在我的页面上创建一个 Kendo Angular 网格控件,并在特定列上使用复选框列表过滤器(列配置可过滤:{multi:true} 没有帮助。)该列具有不同的值。我需要实现的自定义过滤器是一个复选框列表,如下面的线框所示(现在只有第一列,过滤器是焦点)。
列表中黄色突出显示的项目是过滤器项目。我没有看到任何开箱即用的功能来启用此功能。我已经尝试过使用下面的 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);
}
但多选控件不是必需的。以前有人试过吗?
【问题讨论】:
标签: javascript angularjs kendo-ui kendo-grid