2013-05-06 103 views
1

我想用多选框筛选我的kendo Grid。我有serverFiltering网格接通具有更多或更少的这种设置:Kendo Grid ServerFiltering with MultiSelect

// this is in the grid configuration 
columns: [ 
      { 
      title: "Name", 
      width: 160, 
      field: mem_ORD_EditieTitel, 
      filterable: { 
        ui: multiSelect 
        } 
      }, ... 
     ] 


// and the function corresponding to the filterable option 

function multiSelect(element) 
{ 
    var multi = element.kendoMultiSelect({ 
     placeholder: "Select editions", 
     dataSource: remoteDataSource, 
     dataTextField: "mem_ORD_EditieTitel", 
     dataValueField: "mem_ORD_EditieTitel", 
     optionLabel: "--Select Value--" 
    }).data('kendoMultiSelect'); 
} 

的问题是,当我选择多个值时,请求仅包括所述第一选择的项目。有没有什么办法解决这一问题?或者剑道网格不具有这个功能?例如:

filter[filters][0][field]:mem_ORD_EditieTitel 
filter[filters][0][operator]:eq 
filter[filters][0][value]:SomeTitle 
filter[logic]:and 

由于

回答

0

当我使用这样的定义:

element.kendoMultiSelect({ 
    valuePrimitive: true, 
    dataSource: kendoDataSource, 
    dataTextField: textField, 
    dataValueField: valueField, 
    optionLabel: optionLabel 
}).data("kendoMultiSelect"); 


多个值发送到服务器:

filter[filters][0][field]  SubFunctionCode 
filter[filters][0][operation] eq 
filter[filters][0][value]  ICT-2,ICT-3 
filter[logic] and 
page  1 
pageSize 5 
skip  0 
take  5 

滤波器[过滤] [0] [value]等于“ICT-2,ICT-3”

下一个挑战是如何在服务器端处理逗号分隔值。我没有针对此问题的解决方案...