问:如何使用复选框过滤kendo-grid数据?

时间:2016-09-27 08:52:48

标签: javascript kendo-ui kendo-grid

有没有办法使用复选框过滤kendo网格数据? 样本网格数据



var defaultData = [{
  clientName: "Jupiter-RTU-0B40",
  clientTypeID: 1,
  clientType: "PrimaryProbe",
  SystemTypeID: 5,
  SystemTypeName: "TEMS Automatic",
  lastUpdate: "28d",
  location: "3.08191833333333,101.58238",
  status: "InProcess",
  groups: [1, 2]
}, {
  clientName: "RTU0010F3360B40",
  clientTypeID: 2,
  clientType: "Probe",
  SystemTypeID: 5,
  SystemTypeName: "TEMS Automatic",
  lastUpdate: "28d",
  location: "3.08191833333333,101.58238",
  status: "Pending",
  groups: [1, 2]
}, {
  clientName: "MPC00200C6C2ACE",
  clientTypeID: 1,
  clientType: "PrimaryProbe",
  SystemTypeID: 5,
  SystemTypeName: "TEMS Automatic",
  lastUpdate: "82d",
  location: "63.7443,19.9584",
  status: "InProcess",
  groups: [1, 2]
}, {
  clientName: "RTU0010F33FDBD8",
  clientTypeID: 1,
  clientType: "PrimaryProbe",
  SystemTypeID: 5,
  SystemTypeName: "TEMS Automatic",
  lastUpdate: "0d",
  location: "3.08191833333333,101.58238",
  status: "InProcess",
  groups: [1, 2]
}, {
  clientName: "RTU0010F33FDBD8",
  clientTypeID: 2,
  clientType: "Probe",
  SystemTypeID: 6,
  SystemTypeName: "TEMS Automatic",
  lastUpdate: "0d",
  location: "3.08191833333333,101.58238",
  status: "Pending",
  groups: [1, 2]
}]




例如,我有一个复选框列表,允许用户选中/取消选中。取消选中lastUpdate之类的示例,然后网格将相应地显示除lastUpdate之外的所有数据。

1 个答案:

答案 0 :(得分:0)

要获取布尔过滤器,您必须定义数据源模型。您可以将字段类型设置为布尔值,因此kendo将显示布尔过滤器。