Last Updated:
15 Sep 2023 10:52
by ADMIN
**Description**:
I've encountered an issue with the Telerik Grid component in Blazor where caching the grid state, specifically the filtering state, leads to a casting exception upon reloading the page.
**Steps to Reproduce**:
1. Set up a Telerik Grid with a nullable enum column (e.g., `LeadStatuses? Status`).
2. Apply a filter to the `Status` column.
3. Save the grid state (including the filter state) to cache.
4. Refresh the browser.
5. Load the grid state from cache and apply it to the grid.
**Expected Behavior**:
The grid should load with the previously applied filter without any issues.
**Actual Behavior**:
A casting exception occurs, specifically: "Specified cast is not valid."
**Additional Information**:
- The issue seems to be related to filtering and saving state to the grid. When the column is removed, the error doesn't occur.
- Clearing the filter from the cached state for gid will work.
- The exact error message is:
```
Unhandled exception rendering component: Specified cast is not valid.
Duplicated
This item is a duplicate of an already existing item. You can find the original item here: