【问题标题】:Kendo UI Angular Grid checkbox list custom filterKendo UI Angular Grid 复选框列表自定义过滤器
【发布时间】: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


    【解决方案1】:

    我使用的是旧版本 2014.x.x。新版本 2015.x.x 支持 filterable:{multi:true}。升级到最新版本。这是我解决它的方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-08
      • 2015-05-02
      • 2016-01-23
      相关资源
      最近更新 更多