Kendo Grid - prevent server side filtering

0 Answers 16 Views
Data Source Grid
Jiří
Top achievements
Rank 1
Jiří asked on 10 Apr 2025, 12:18 PM | edited on 15 Apr 2025, 08:48 AM
Settings of the data source are as follows:

$scope.dataSource = new $kendo.data.DataSource({ pageSize: 10, serverPaging: false, serverFiltering: false, schema: { model: { id: "id" } }, transport: { read: read } });

 

$scope.gridOptions = {
    selectable: "multiple",
    pageable: {
        pageSizes: [5, 10, 15, 20, 25, 50]
    },
    persistSelection: true,
    resizable: true,
    filterable: { mode: "row" },
    sortable: {
        mode: "multiple",
        allowUnsort: true
    }
};

 

// template

<div kendo-grid k-data-source="dataSource " k-options="gridOptions">
</div>

Even if the serverFiltering is set to false, when I write something to the filter textbox, the read function is invoked, but just for the first time.

Any help, please?

Neli
Telerik team
commented on 15 Apr 2025, 06:48 AM

Hi Jiří,

I tried to replicate the issue, but to no avail. The configuration of the dataSource in the Dojo linked here is based on the provided snippet in the thread. Could you please take a look and let me know if I am missing something: https://dojo.telerik.com/ctiSooVC. Any details of how the issue can be replicated locally will be appreciated.

Looking forward to your reply.

Regards,

Neli

Jiří
Top achievements
Rank 1
commented on 15 Apr 2025, 09:00 AM | edited

Dear Neli,

I realized I suppressed one very important note - I updated my question (also removed some nonsense lines).

The trick is, when the 'filterable' property of 'options' is set just to 'true' (like in your example), everything is fine. Problem arises, when it is changed to '{ mode: "row" }', which actually should, from my point of view, have the same effect (there is just the difference, that with 'true' the little popup comes up, while in my case there is just the filtering textbox), but it does not have - it sends new request.

An updated example:

https://dojo.telerik.com/DMgsogJr/3

Jiří
Top achievements
Rank 1
commented on 15 Apr 2025, 09:22 AM | edited

I'm very sorry for consuming your time, I've overlooked the yellow information box in this site, which explains everything.

When the filterable.mode property is set to "row" or "menu, row", the Grid dataSource instance is copied and applied to the Kendo UI AutoComplete widgets used for string filtering. This will cause one additional read request per string column. The AutoComplete dataSources do not perform paging and will use a collection of the unique column values only.
Jiří
Top achievements
Rank 1
commented on 15 Apr 2025, 09:48 AM | edited

For later visitors, who would like to use 'contains' operator also for the AutoComplete widget:

columns: [
    {
        field: "name",
        filterable: {
            cell: {
                suggestionOperator: "contains"
            }
        }
    }
]
Reference
Neli
Telerik team
commented on 18 Apr 2025, 05:50 AM

Hi Jiří,

As far as I understand you manage to resolve the issue. Thank you for sharing the solution that was helpful in you case. I am sure it will help to the other users in the forum as well.

In case you have any additional questions, do not hesitate to contact us.

Regards,

Neli

No answers yet. Maybe you can help?

Tags
Data Source Grid
Asked by
Jiří
Top achievements
Rank 1
Share this question
or