1
votes

I am trying to filter my kendo Grid with a multiselect box. I have a grid with serverFiltering turned on with more or less this setup:

// 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');
}

The problem is that when i select more than one value, the request only includes the first selected item. Is there anyway to fix this? Or does the kendo grid just doesnt feature this? For example:

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

Thanks

1

1 Answers

0
votes

When I use this definition:

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


Multiple values are posted to the server:

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

The filter[filters][0][value] equals "ICT-2,ICT-3".

The next challenge is how to process the comma-separated value at the server-side. I do not have a solution for this issue...