Filtering using dropdown

2 posts, 0 answers
  1. Jon
    Jon avatar
    51 posts
    Member since:
    Oct 2013

    Posted 30 Mar Link to this post

    I'm looking at an example in your mvc demo where you use checkboxes to filter events in a scheduler. I wish to implement a similar function but need to use a dropdown (due to the number of options). The code for the checkbox scenario is...

    $("#people :checkbox").change(function(e) {
            var checked = $.map($("#people :checked"), function(checkbox) {
                    return parseInt($(checkbox).val());});
    var scheduler = $("#scheduler").data("kendoScheduler");
                            operator: function(task) {
                                    return $.inArray(task.ownerId, checked) >= 0;

    How do I achieve similar (my dropdown values are strings) using a dropdown?

  2. Vladimir Iliev
    Vladimir Iliev avatar
    2156 posts

    Posted 01 Apr Link to this post

    Hello Jon,

    When you sing the DropDownList you can simply modify the filter operator to compare current item resource field value with the DropDownList value (inside it's "change" event):

      operator: function(task) {
        return task.ownerId == ddlValue;

    Vladimir Iliev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top