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

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

Original Pull Request: https://github.com/radzenhq/radzen-blazor/pull/1714

State: closed
Merged: Yes


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!

**Original Pull Request:** https://github.com/radzenhq/radzen-blazor/pull/1714 **State:** closed **Merged:** Yes --- 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!
claunia added the pull-request label 2026-01-29 18:20:51 +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#2872