title: Sorting an enumeration column whose value is stored as int in database
body: <p>I have a column on an asp.net Gridview whose type is an enumeration. I display the description of the enum on the UI, and save the int value in the database. This is my enum definition </p>
  
  <pre><code>public enum ItemStatus : int
  {
     [DescriptionAttribute("New Item")]
     New = 0,
     [DescriptionAttribute("Closed")]
     Closed = 1,
     [DescriptionAttribute("Not Assigned")]
     Unassigned = 2,
     [DescriptionAttribute("Assigned")]
     Assigned = 3
  } 
  </code></pre>
  
  <p>I save this <code>ItemStatus</code> as an Int in the database and users see the enum string value (like Not Assigned) on the UI. Users should be able to do a sorting (Asc,Desc) on this column in the Grid. </p>
  
  <p>Since I save this as an int in the Database, after I "hydrate" the object, the <code>ItemStatus</code> column on the UI is not sorted alphabetically. Users expect this to be sorted alphabetically on the UI. </p>
  
  <p>I cant think of a way to do that.I use  Asp.net and C#
  Thanks in advance</p>