Feature from Fluent UI Blazor 4.9
[DataGrid] Make PropertyColumn use DisplayAttribute value for enum (#2304)
supports enum types but does not support nullable enum types. DataGrid works correctly for example data
public enum Positions
{
employee,
[Display(Name = "HR Manager (DA)")]
HrManager,
[Display(Name = "Project Manager (DA)")]
ProjectManager,
[Display(Name = "Administrator (DA)")]
Administrator
}
public class Employee
{
[Display(Name = "Id")]
public int Id { get; set; }
[Display(Name = "Position")]
public Positions Position { get; set; }
}
but DataGrid/PropertyColumn does not recognize nullable enum property (Position? Positions) as enum and attribute Display is ignored.
public class Employee
{
[Display(Name = "Id")]
public int Id { get; set; }
[Display(Name = "Position")]
public Positions? Position { get; set; }
}