[PR #1714] [MERGED] Enum filtering using underlying types other than Int32 is now supported. #2869

Open
opened 2026-01-29 18:20:50 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1714
Author: @fallen576
Created: 9/27/2024
Status: Merged
Merged: 9/30/2024
Merged by: @enchev

Base: masterHead: master


📝 Commits (1)

  • 13d1115 Enum filtering using underlying types other than Int32 is now supported.

📊 Changes

3 files changed (+7 additions, -4 deletions)

View changed files

📝 Radzen.Blazor/Extensions.cs (+2 -1)
📝 Radzen.Blazor/QueryableExtension.cs (+3 -2)
📝 Radzen.Blazor/RadzenDataGridColumn.razor.cs (+2 -1)

📄 Description

Currently Enum filtering only supports underlying types of Int32.

Reproducible example using the datagrid-enum-filter example (https://blazor.radzen.com/datagrid-enum-filter). Change the GenderType enum from:

public enum GenderType
{
    Ms,
    Mr,
    Unknown,
}

to

public enum GenderType : long
{
    Ms=0x100000000,
    Mr=0x100000001,
    Unknown=0x100000010,
}

and click run. The application throws the following exception:

System.OverflowException: Value was either too large or too small for an Int32.

Cheers!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/1714 **Author:** [@fallen576](https://github.com/fallen576) **Created:** 9/27/2024 **Status:** ✅ Merged **Merged:** 9/30/2024 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`13d1115`](https://github.com/radzenhq/radzen-blazor/commit/13d11156b267b8d0e79925dccd63bced14e702a7) Enum filtering using underlying types other than Int32 is now supported. ### 📊 Changes **3 files changed** (+7 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/Extensions.cs` (+2 -1) 📝 `Radzen.Blazor/QueryableExtension.cs` (+3 -2) 📝 `Radzen.Blazor/RadzenDataGridColumn.razor.cs` (+2 -1) </details> ### 📄 Description Currently Enum filtering only supports underlying types of Int32. Reproducible example using the datagrid-enum-filter example (https://blazor.radzen.com/datagrid-enum-filter). Change the GenderType enum from: ``` public enum GenderType { Ms, Mr, Unknown, } ``` to ``` public enum GenderType : long { Ms=0x100000000, Mr=0x100000001, Unknown=0x100000010, } ``` and click run. The application throws the following exception: ``` System.OverflowException: Value was either too large or too small for an Int32. ``` Cheers! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:20:50 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2869