Skip to content

When server-side localization is used the Filtering is enabled for all columns #7730

@kendo-bot

Description

@kendo-bot

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)
	...
)
  1. 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]

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions