Completed
Last Updated: 14 Nov 2024 09:27 by ADMIN
Release 7.0.0
Vitro
Created on: 18 May 2022 04:13
Category: Grid
Type: Bug Report
1
Grid filter not refreshing when setting column visibility to false

When filtering using a GridSearchBox - to filter across all columns, we have an issue where if you change a GridColumns Visible attribute to false that row will still be visible in the grid results even though it no longer matches the filter.

Take this snippet for example: Telerik REPL for Blazor - The best place to play, experiment, share & learn using Blazor.

1. Use Search box and search for a Name. e.g "Chang"

2. Click "Toggle Name Visibility" button

Expected: Since Name column is now hidden, the column should no longer be used in filter and the row should no longer be displayed. In reference to the GridSearchBox: https://docs.telerik.com/blazor-ui/components/grid/filter/searchbox#filter-from-code where it's mentioned that the search box will filter only on columns that are visible. It doesnt seem to refresh the filter.

Actual: Row still displayed even though it no longer matches filter

Just wanting to raise this as an issue and also hoping you may know a potential work-around for this?

A potential work-around I have tried is re-applying the existing filter in the search box by following documentation here in the "Filter From Code" section: https://docs.telerik.com/blazor-ui/components/grid/filter/searchbox#filter-from-code

While I am able to apply a filter from code I cannot seem to retrieve the value that is currently in the search box as I want to reuse it. How can I achieve this with a GridSearchBox? There doesnt seem to be a property available on the GridSearchBox component for binding it's value. Would I need to create a custom filter input to achieve this?

 

 

2 comments
ADMIN
Dimo
Posted on: 19 Sep 2024 17:25

Hello everyone,

After looking into this item, we concluded that it relates to behavior, which can be subject to personal preferences. For example, we have received multiple questions about how to search in hidden Grid columns.

We prepared a KB article that shows how to change Grid search results dynamically when the users hides or shows columns. The default built-in Grid behavior will remain as is.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Tsvetomir
Posted on: 18 May 2022 14:03

Hello,

Thank you for the provided detailed feedback. Indeed, the suggestion is a valid feature enhancement. If the Visible property of the columns receives two-way binding, this will result in an increased reactivity, therefore, the state will be automatically adjusted. I have converted the current thread to a public feedback portal item.

Until the enhancement is implemented, I recommend updating the state of the grid manually after toggling the visibility of the column. This can be implemented in the OnClickHandler method.

Let me know if there is a need for additional information.

Regards,
Tsvetomir
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.