Kendo Grid Filter网格基于集合中的值

时间:2013-01-11 18:40:40

标签: kendo-ui

简单而又难以理解。我只想根据FileCategory过滤器类别名称对网格应用过滤器。假设我想过滤类别名称为Central Supply的项目的网格。这是数据和我的尝试。在我的尝试中,我表明过滤器适用于属性(单个值),但我不能使它适用于集合。

Data: [
    -{
    Id: 1
    FileName: "MyFile"
    RevisionDate: "2013-01-08T00:00:00"
    FormNumber: "MyFormName"
    FormTitle: "aa"
    Class: "a"
    SecondaryCategory: "a"
    UploadDate: "2013-01-11T08:34:46.677"
    -FileCategoryFilter: [
    -{
    FileCategoryId: 1
    CategoryName: "Administrative Manual Docs"
    Active: true
    File: null
    }
    -{
    FileCategoryId: 4
    CategoryName: "Central Supply"
    Active: true
    File: null
    }
    ]
    }

Kendo Grid Server Wrapper

 .Filter(filters =>
 // { filters.Add(p => p.FileName).IsEqualTo("Central Supply");})
//this filter works for a property but I havent figured out how to do a collection. 
    { 
       filters.Add(
             p =>p.FileCategoryFilter.Select(i=>i.CategoryName).Contains("Central Supply")
    );
 })

1 个答案:

答案 0 :(得分:2)

我担心这不受支持 - 只有单个值可用于运营商。包装器使用以下客户端等效项 - 检查文档的this part。您可以尝试使用OR逻辑在同一字段上指定多个过滤器。

相关问题