I have a field in my DTO that is an integer. In the database, there are some numbers stored as 1, 2, 101 etc. I want to make sure in the system they are always display as three digits, so 001, 002 for example. This is not working and I cannot figure out how to do it...any ideas out there? Here is the snippet from my DTO:
Private mArea As Integer
<Display(name:="Area")> _
<DisplayFormat(DataformatString:="{0:000}")> _
Public Property Area() As Integer
Get
Return mArea
End Get
Set(ByVal value As Integer)
mArea = value
End Set
End Property
You could treat the value as a string.