Skip to content

Commit 540278e

Browse files
author
Raj Kumar Sri Ramulu
committed
Updated the example to use the Display attribute
1 parent 93bab57 commit 540278e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

BlazorBootstrap.Demo.RCL/Components/Pages/Grid/03-filters/Grid_Demo_05_Enum_Filters.razor

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<Grid TItem="User"
1+
@using System.ComponentModel.DataAnnotations
2+
3+
<Grid TItem="User"
24
Class="table table-hover table-bordered table-striped"
35
DataProvider="UsersDataProvider"
46
AllowFiltering="true"
@@ -15,7 +17,7 @@
1517
@context.DOB
1618
</GridColumn>
1719
<GridColumn TItem="User" HeaderText="Status" PropertyName="Status" FilterTextboxWidth="170">
18-
@context.Status
20+
@(typeof(UserStatus).GetDisplayName(context.Status))
1921
</GridColumn>
2022
</GridColumns>
2123

@@ -60,6 +62,7 @@
6062
public enum UserStatus
6163
{
6264
Registered,
65+
[Display(Name = "Pending Verification")]
6366
VerificationPending,
6467
Verified
6568
}

0 commit comments

Comments
 (0)