Telerik Forums
Kendo UI for jQuery Forum
1 answer
20 views

For certain types of data in my grid, I need to define custom filter operators, e.g.:

updateOrAddFilter(fieldKey, {
    field: fieldKey, operator: function (item) {
        const nItem = normalize(item);
        const nValue = normalize(value);

        return nItem && nItem.includes(nValue);
    }
});

The updateOrAddFilter function then browses through the all the filters currently applied to the grid's dataSource, replaces old current-column filters with the new one and keeps all the other-column ones, and updates the grid's dataSource as such:

grid.dataSource.filter({ logic: "and", filters: updatedFilters });

The problem is that - it doesn't work! The updateOrAddFilter function works exactly as expected until I try to combine the custom operator filter with others.

Why is this happening? How can I fix it? Thanks in advance.
Martin
Telerik team
 answered on 11 Jun 2025
1 answer
40 views

Hello!

Is there a simple way to remove autocomplete from gridfilter?
I want to use filterbox. I need filterbox. But I don't want autocomplete.

https://dojo.telerik.com/hYMEJZcB

Thank you

Neli
Telerik team
 answered on 09 Apr 2025
0 answers
37 views

Hi,

In our project, we are using Kendo Grid for data display and filtering. When performing a text search, I can set columns.filterable.ignoreCase to true for the search to be case-insensitive. Is there a way to make the search also diacritics-insensitive with a custom function? Thanks in advance :)

Iryna
Top achievements
Rank 1
 updated question on 17 Mar 2025
1 answer
48 views

This might be more of an enhancement request, but I discovered that the filter widget incorrectly orders items if you reload the state. You can see this functionality in the jQuery demo here: https://demos.telerik.com/kendo-ui/filter/persist-state

Steps to reproduce:

  1. Add a second line to the filter
  2. Change "ContactTitle" to "Country" on the first line
  3. Click "Save State" and then "Load State"
  4. See that the items were reordered

As far as I can tell, this happens because changing a filter line removes the item from the FilterModel and then calls Push which adds it to the end of the array.

Martin
Telerik team
 answered on 17 Jan 2025
1 answer
64 views

Hi,

We are attempting to set the default values of new rows in a grid based on some user-specified filters. The desired functionality is that if, for example, the "Year Level" filter is set to "Year 1", when a new row is created it will have its Year Level value automatically set to Year 1 AND will be visible in an edit state in the grid. 

We have read the previous Q&A here, however this solution is not suitable as it makes ALL rows with no "Year Level" value become visible when a new row is created.

As the "edit" event does not seem to fire when creating a new row whilst filters are applied, the implementation we are attempting involves saving those filters when the "Add" button is clicked and then re-applying them after the row has been created. This mostly works, but the new row is inserted as an un-editable dirty record and clicking its "Edit" button does nothing.

The code below is a combination of a couple of different approaches. Any guidance would be greatly appreciated!

let currentEditRow;
let currentModel;

$(".k-grid-add").click(function () {
    var grid = $("#grid").data("kendoGrid");

    // Save the current filters before clearing them
    savedFilters = grid.dataSource.filter();
    grid.dataSource.filter([]); 

    // Add a new row and enter edit mode
    currentEditRow = grid.addRow(); 
    grid.editRow(currentEditRow); // Attempting to force new row into edit mode here does not work
});

$("#grid").kendoGrid({
    dataSource: ds,
    sortable: true,
    toolbar: ["create"],
    columns: [
        {
            field: "Yearlevel",
            sortable: false,
            title: "Year Level",
            editor: cmbEditorYearlevelForHomegroup,
            template: "#=Yearlevel?.Name ?? ''#",
            editable: isEditable
        },
        // Other columns here
        { command: ["edit", "destroy"], title: "Action", width: "180px" }],
    editable: "inline",
    edit: function (e) {
        currentEditRow = $(e.container); // Save reference to the editing row
        currentModel = e.model; // Save the current model

        if (e.model.isNew()) {
            var yearLevelDropdown = $("#yearLevel").data("kendoDropDownList");
            e.model.set("Yearlevel", { // Update the values in the new row based on the selected filters
                Code: yearLevelDropdown.value(),
                Id: 0,
                Name: yearLevelDropdown.text()
            });

            var grid = $("#grid").data("kendoGrid");
            if (savedFilters) {
                grid.dataSource.filter(savedFilters); // Re-apply the filters
            }
            if (currentEditRow && currentModel && currentModel.isNew()) {
                var grid = this;
                setTimeout(function () {
                    grid.editRow(currentEditRow); // Attempting to re-enter edit mode for the new row; this also does not work
                });
            }
        }
    }
});

Martin
Telerik team
 answered on 10 Oct 2024
1 answer
71 views

Hi support team,

 

we need filterable: { mode: "row" }  to have  a filter row.

We also need a DropDownList for a boolean column in the filter as described here:

https://docs.telerik.com/kendo-ui/knowledge-base/grid-boolean-dropdownlist-filter

 

When using this we see an ugly filter row item:

 

I expect to have the DropDownList in the filter row.

 

This worked using following MVC template  syntax in the past


   .Filterable(f => f.Multi(false).Cell(c => c.ShowOperators(false)
   .Template(@<text>
               function(args) {
               args.element.kendoDropDownList({
               autoBind: false,
               dataTextField: "text",
               dataValueField: "value" ,
               dataSource: new kendo.data.DataSource({
               data: [{ text: "Ja" , value: "true" },
               { text: "Nein" , value: "false" }]
               }),
               index: 0,
               optionLabel: {
               text: "Filter" ,
               value: ""
               },
               valuePrimitive: true
               })
               }
            </text>

 

is this a bug?

 

Eyup
Telerik team
 answered on 27 Sep 2024
0 answers
104 views

I am running into an issue with allowing copy/paste of dates into the filter and cell input fields. Currently, the date fields have validation to support MM/dd/yyyy, and users of the app may be trying to copy dates in that are MM/dd/yy. I would expect Kendo to auto format the date to MM/dd/yyyy after the paste happens, or at least allow support for that, but it doesn't seem to happen.

In the cell, when putting in MM/dd/yy, a validation message appears saying the date is invalid, and there doesn't appear to be a way to override that. In the filter, when putting in MM/dd/yy and submitting the filter, it doesn't stick and completely ignores the date put in.

Is there any way with the latest version of Kendo (I am on 16) to allow for different date formats in these fields, or is there the possibility that this is something coming in the future?

1 answer
81 views

Hello,

I am currently using Kendo Grid MVC in .NET Core. My customer needs a way to search one column for multiple words.

For example: If I type in "123 789" it should return an entry with "123456789".

Is there a way to achieve this? Thanks,

Alexander
Telerik team
 answered on 24 Jul 2024
1 answer
116 views

Hi everyone,

I'm currently working on a Kendo UI Grid and I need the filter menus to dynamically update based on the data currently displayed in the grid. Specifically, I want the filter options to reflect only the unique values of the data that is currently visible after applying other filters.

I'm using Kendo UI version 2021.3.914.

I found a solution that achieves exactly what I want in this example: Kendo UI Dojo Example. However, the solution in the example does not work with my version of Kendo UI.

Could someone please help me understand how to implement this functionality in my version of Kendo UI? Any guidance or suggestions would be greatly appreciated.

Thank you in advance!

Nikolay
Telerik team
 answered on 23 Jul 2024
1 answer
126 views

Hello!

I am trying to use ListView with Buttons inside a Tabstrip. I want the user to be able to select an item to view a report.
As part of this list, I want a clickable hamburger button for the user to open up a popover menu for additional settings.

This setup works for all browsers when I do not perform the "filter" function. However on Firefox (only), using this filter function on the ListView causes my Kendo buttons inside the list to suddenly not fire the onClick handlers.

    $("#listView").data("kendoListView").dataSource.filter({      
      filters: [
        { field: "Document_Number", operator: "contains", value: "J82901" }
      ]
    });

On Chrome and Edge, the Kendo buttons work just fine even after this filter. On Firefox however, I notice that the Kendo buttons are unformatted and do not respond to the click events when logging output in the console.

To reproduce the issue, I have provided the following dojo code: Sandbox Code here

 

Here is a sample image of the output: I have a Tabstrip with a ListView nested within. Each ListView entry has a button attached to it via a template. On click, the button should fire the click handler and print output to the console. (And a popover in the future)

Any help to get this working on Firefox would be greatly appreciated! This is an older version of Kendo UI (Sept 2021).

Thanks.

Geraldine
Top achievements
Rank 1
Iron
 answered on 10 Jun 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?