This is a migrated thread and some comments may be shown as answers.

Combobox and multiple filters

7 Answers 348 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Hans van Rijnswoud
Top achievements
Rank 2
Hans van Rijnswoud asked on 17 Dec 2013, 08:25 AM
Hi Telerik,

We have an issue with kendo ui  Combobox control. Scenario is folowing: user wants to filter data not only by Company name but also by city in which this company is located.
Here is example of data :
{"Id":1,"Name":"AAA","City":"Amsterdam","Country":"The Netherlands"}

We wand to use composite client filter on Combobox together with Datasource. I simplified solution and put it here (http://jsfiddle.net/MbvgC/1/). Problem is that this solution is not work completely. When you have only one filter, then everything is ok, but if you add additional filter then combobox stops display any data:

filter: { 
        logic: "or",
        filters: [
               { field: "Name", operator: "contains" },
               { field: "City", operator: "contains" }
       ]
},

Can you tell us what is wrong with this approach?

Best regards,

7 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 17 Dec 2013, 02:33 PM
Hi Hans,

The problem comes from the fact that you are not specifying a value for the filters. When a value is entered it seems to be working as expected. Please check this example:

http://jsbin.com/iZobiYuW/1/edit

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Hans van Rijnswoud
Top achievements
Rank 2
answered on 17 Dec 2013, 03:06 PM
Hi Kiril,

Thank you for your response, but that was not an idea to add filters manually. For me expected behavior is when filters on datasource is automatically integrates with input value from combobox. And when user puts first letters of Name or City combobox is filtered automatically. This scenario is working when there is only one filter but not working completely is there is two or more filters.

Is this behavior is by design or this is an issue? How can I satisfy scenario that I listed above?

Regards,
0
Kiril Nikolov
Telerik team
answered on 18 Dec 2013, 09:03 AM
Hi Hans,

The functionality that you are looking for is not supported. Currently the Combobox supports filtering by one property only. If you need to filter on multiple properties you will need to do this manually as I have shown you in my example from the previous response, or you can implement server filtering and handle this functionality on the server side.

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Hans van Rijnswoud
Top achievements
Rank 2
answered on 18 Dec 2013, 03:23 PM
Hi Kiril,

For me it's logical to setup any filters that I want and be able to pass value from user input to these filters. To achieve this I should add very custom functionality that will handle onkeydown on combobox and then remove and add filter. Another approach with server filtering is acceptable, but there are not some many data to use it. It's reasonable to use client filtering.

Is it planed to have this functionality in next releases? Can I extend/override conmbobox to support this?

Regards,
0
Kiril Nikolov
Telerik team
answered on 18 Dec 2013, 03:44 PM
Hi Hans,

I can see your point, but as I said this feature is not currently supported. 

I would suggest you to check the uservoice portal and post your suggestion there, so it can be considered for a future implementation.

As for extending the widget - you can try to implement this functionality client side or by extending the widget, however this is not covered by the standard support services, and if you need any assistance doing it, you will need to turn to our Professional Services

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Marcel
Top achievements
Rank 1
answered on 04 Feb 2015, 01:36 PM
Has there been a fix for multiple filters using a combobox? 
0
Kiril Nikolov
Telerik team
answered on 06 Feb 2015, 10:27 AM

Hello Marcel,

Still not supported. You can submit this as a feature request on UserVoice.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
ComboBox
Asked by
Hans van Rijnswoud
Top achievements
Rank 2
Answers by
Kiril Nikolov
Telerik team
Hans van Rijnswoud
Top achievements
Rank 2
Marcel
Top achievements
Rank 1
Share this question
or