Filter type on RadzenDataGrid

Hello. I'm working with Radzen Blazor components, specifically the RadzenDataGrid (I am using my own grid implementation inherited by RadzenDataGrid)with SimpleWithMenu for filtering. My grid is designed to handle dynamic data sources, and for this purpose, I'm using an IDictionary<string, object> to manage the data. This setup allows me to dynamically load different datasets into the grid, which can vary in data types, column counts, and other specifics.

The initial load of data into the grid works as expected, with the filters being correctly assigned based on the data types of the columns. However, I'm encountering an issue when switching between different datasets within the same grid. Despite the data and, consequently, the column data types changing, the filter types do not update accordingly. They retain the filter types based on the initial dataset's column types. For instance, if a column initially contains strings and its filter is set up for string operations, changing the dataset to one where the same column's index now represents boolean values does not update the filter to reflect this change. The filter incorrectly remains configured for string operations.
It doesn't matter how many times I will provide a new set of data and definition for columns. Filter/Grid keeps the first value.

This behavior leads to a mismatch between the actual data types of the columns and the filter types, affecting the usability and integrity of the filtering functionality.

Here are some key points about the implementation:

The grid is set up with FilterMode configured to SimpleWithMenu.

Data is dynamically loaded (via LoadData)into the grid using IDictionary<string, object> to accommodate different datasets with varying column types and counts.

The issue arises when switching between these datasets: the grid's data updates correctly, but the filter types do not adjust to match the new data types.

I've provided the definition for columns directly in the grid. In addition, I added my columns definition into SerParameters.

public override async Task SetParametersAsync(ParameterView parameters)

{

Columns = BuildColumns();

FilterMode = FilterMode.SimpleWithMenu;

await base.SetParametersAsync(parameters);

}

Interestingly, when I switch to a different dataset and set the property Filterable is set on false. The filters do not appear as expected for those columns.

I'm seeking advice on how to ensure that the filter types dynamically adjust to match the data types of the columns when new data is loaded into the grid. Is there a recommended approach to refresh or reset the filter configurations in RadzenDataGrid when the data source changes? Any insights, workarounds, or examples on handling this scenario would be greatly appreciated.