Combobox and multiple filters

8 posts, 0 answers
  1. Hans van Rijnswoud
    Hans van Rijnswoud avatar
    72 posts
    Member since:
    Sep 2008

    Posted 17 Dec 2013 Link to this post

    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,
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 17 Dec 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Hans van Rijnswoud
    Hans van Rijnswoud avatar
    72 posts
    Member since:
    Sep 2008

    Posted 17 Dec 2013 Link to this post

    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,
  5. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 18 Dec 2013 Link to this post

    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!
  6. Hans van Rijnswoud
    Hans van Rijnswoud avatar
    72 posts
    Member since:
    Sep 2008

    Posted 18 Dec 2013 Link to this post

    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,
  7. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 18 Dec 2013 Link to this post

    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!
  8. Marcel
    Marcel avatar
    1 posts
    Member since:
    Feb 2015

    Posted 04 Feb 2015 in reply to Kiril Nikolov Link to this post

    Has there been a fix for multiple filters using a combobox? 
  9. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 06 Feb 2015 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready