Completed
Last Updated: 11 Jun 2024 16:08 by ADMIN
Release 2024 Q3 (Aug)
Saurabh
Created on: 16 Feb 2024 10:42
Category: TreeList
Type: Bug Report
0
When server-side localization is used the Filtering is enabled for all columns

### Bug report

When server-side localization is used (the culture is different than the default one ("en-US")), all columns are filterable, even when the Filterable() configuration is disabled.

### Reproduction of the problem

1) Create a filterable TreeList and disable the filtering of a specified column.

2) Set the server-side culture to "es-ES".

//Web.config

<system.web>
    <globalization uiCulture="es-ES" culture="es-ES"></globalization>
</system.web>

//View.cshtml
@(Html.Kendo().TreeList<UserViewModel>()
        .Name("treelist")
        .Columns(columns => {
            columns.Add().Field(p => p.id).Filterable(false);
            columns.Add().Field(p => p.Name);
            ...
        })
	.Filterable(true)
	...
)

3) The "id" column is filterable even though the filtering is disabled:

### Expected/desired behavior

The filtering per column must be configurable irrespective of whether localization is used or not.

### Workaround

After the TreeList is initialized, call the setOptions() method and disable the filtering of the respective columns:

<script>
    $(document).ready(function () {
        var treelist = $("#treelist").getKendoTreeList();
        if (treelist) {
            var colOptions = treelist.columns;
            colOptions[0].filterable = false;
            treelist.setOptions({ columns: colOptions });
        }
    })
</script>

### Environment

* **Telerik UI for ASP.NET MVC/Core version: 2024.1.130
* **jQuery version: 3.7.0
* **Browser: [all]

0 comments