Telerik Forums
Kendo UI for jQuery Forum
1 answer
520 views

Hi, I recently created a grid with a multiselect filter and noticed that the selected values are not showing if the user selects more than one item and then filters. I could reproduce the behaviour in a short dojo script which comes from the telerik examples.

Is there any reason for this behaviour or did I forget something that makes the filter control fail? If this is a bug, is there a workaround?

In the example, the field that contains the filter is "Name" (2nd column).

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2023.1.117/styles/kendo.default-ocean-blue.min.css">
<script src="https://code.jquery.com/jquery-1.12.3.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2023.1.117/js/angular.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2023.1.117/js/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2023.1.117/js/kendo.all.min.js"></script>
</head>
<body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"></script>
    <div id="grid"></div>
    <script>
      var data = [
        { id: 1, name: "Fred", key: 1, value: "Green" },
        { id: 2, name: "Jed", key: 11, value: "Jorgensen" },
        { id: 3, name: "Red", key: 2, value: "Blah" },
        { id: 4, name: "Ted", key: 23, value: "Bleh" },
        { id: 5, name: "Ed", key: 3, value: "Toast" },
        { id: 6, name: "Zed", key: 4, value: "Smith" },
        { id: 7, name: "Ed", key: 41, value: "Johnson" }
      ];

      $(function() {
        var names = _.sortBy(_.uniq(_.pluck(data, "name")), function(n) { return n; });

        function createMultiSelect(element) {         
          element.kendoMultiSelect({
            dataSource: names
          });
        }

        var dataSource = new kendo.data.DataSource({
          data: data,
          schema: {
            model: {
              fields: {
                id: { type: "number" },
                name: { type: "string" },
                key: { type: "number" },
                value: { type: "string" }
              }
            }
          }
        });

        var grid = $("#grid").kendoGrid({
          dataSource: dataSource,
          sortable: true,
          filterable: true,
          columns: [
            {field: "id", title: "Id"},
            {
              field: "name",
              title: "Name",
              filterable: {
                ui : createMultiSelect,
                extra: false
              }
            },
            {field: "key", title: "Key"},
            { field: "value", title: "Value"}
          ]
        });
      });
    </script></body>
</html>
Martin
Telerik team
 answered on 16 Feb 2023
0 answers
53 views

I have a Kendo grid Jquery component with field grouped and hidden. I would like to show a filter button based on this field. Could you help me ?

Thanks

Alex
Top achievements
Rank 1
 asked on 16 Feb 2023
0 answers
141 views

Hi,

When I tried to filter the grid by pressing the buttons on top of the grid, the filtering does not appear to work.

I just dont know where I went wrong. I have done quite a few of them without issues, but on this one, i cannot see where the problem is. I have now triple check the code and I still can't see it!

Adding here a link to the dojo: https://dojo.telerik.com/@galedin/EXAZIJIx

 

Thanks,

 

 

Monica
Top achievements
Rank 1
Iron
 updated question on 20 Dec 2022
1 answer
81 views

Dear team,

I am facing an issue realted to kendo dropdwonlist filter ,we are getting this issue after upgrading to kendo version v2022.2.510 . The issue is after entring the value in serchbox(filter) it is clearing the value automatically by this the calling to the filtering is happening twice to server side. how to prevent this auto clearing please suggest the way. 

 

 

Thank you for your support,

Regards,

Sai

Lyuboslav
Telerik team
 answered on 02 Dec 2022
1 answer
1.7K+ views

I have a Kendo DropdownList as follows : 

    $("#txtTag").kendoDropDownList({
        dataTextField: "TagDesc",
        dataValueField: "TagId",
        optionLabel: " ",
        dataSource: {
            transport: {
                read: {
                    dataType: "json",
                    url: "/Data/GetTag"
                }
            }
        },
        change: onChange,
        filter: "contains"
    });

I have hidden one of the values by using 

$("#txtTag_listbox li")[4].hidden = true;

However, when I do a filter/search on the dropdown List , the hidden item also appears in that list. How do I prevent it to not appear it in the list.

Neli
Telerik team
 answered on 09 Sep 2022
1 answer
53 views

I could not figure out how to localize filter message which is "0 selected items".  I check for the documentary doc

but could not applied it into my code.  Would glad if I could get a help

Nikolay
Telerik team
 answered on 02 Aug 2022
3 answers
95 views

I have a filter on a datasource which in return updates a grid. The following are the code to filter and its' template handler.

 

The problem with this is that, I can load the categories at first when I'm creating the filters. But when I save and reload the filter from local storage, the category dropdown does not load. Please help me with this. It loads up only on a fresh filter.

Thanks in advance.


@(Html.Kendo().Filter<Lovely>()
                                .Name("OrgFilter")
                                .ApplyButton(true)
                                .ExpressionPreview(true)
                                .DataSource("DataSource")
                                .Fields(f =>
                                {
                                    f.Add(p=>p.OrgName).Label("Organization");
                                    f.Add(p=>p.CategoryId).Label("Category").EditorTemplateHandler("CategoryDropdown");
                                    f.Add(p=>p.AsAtDate).Label("As At Date");
                                }))

<script>
function CategoryDropdown(container, options) {
        $('<input data-bind="value: value" name="' + options.field + '"/>')
            .appendTo(container)
            .kendoDropDownList({
                dataTextField: "CategoryId",
                dataValueField: "CategoryId",
                dataSource: @Json.Serialize(ViewData["Catogories"])
            });
    }
</script>

Johhny
Top achievements
Rank 1
Iron
 answered on 30 Jun 2022
0 answers
41 views

When I select a filter dropdown value, it gets populated into other filter fields as well.

I have checked my grid configurations, but couldn't figure our what issue is there.

PS: The attachment is an GIF screen recording of the issue.

Charlie
Top achievements
Rank 1
 asked on 22 Jun 2022
1 answer
78 views

Hi,

I encoutered a problem where I'm trying to have 2 different filter options for a Kendo Grid column and I can't manage to find the answer on how to combine filters like Operators (equal to, is greater than, etc.) and filter multi checkboxes listing all results for that column.

I have a working copy of filter multi checkboxes, but when I try to add a second option on one of my columns.filterable it's not taken into account and I didn't manage to find any answers on a possible how to.

filterable: {
   multi: true,
   operators: {
            string: {
              eq: "Equal to",
              neq: "Not Equal to"
            }
     },
}

I wonder if I need to create a custom template in order to achieve a combination of both to produce this intended result as depicted in the attached picture : IntendedResult.PNG

We are on Kendo UI for jQuery v2019.1.220

Thank you!
Georgi Denchev
Telerik team
 answered on 10 May 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?