title: Searching for a way to autofilter strings on an integer column
body: <p>I am using the devexpress gridview for an vehicle management program and got a column which shows if the data of this row is marked as deleted or not. In the database they are marked with "1" for active and "11" for deleted, so I've created an enum class:</p>
  
  <pre><code>public enum enmSystemstatus
  {
      Created = 1, 
      Deleted = 11
  }
  </code></pre>
  
  <p>and this event to mark them with an word instead of a number in the gridview:</p>
  
  <pre><code>private void gridView1_CustomColumnDisplayText(object sender, CustomColumnDisplayTextEventArgs e)
      {
          if (e.Column == colVehicle_Systemstatus &amp;&amp; e.Value != null)
          {
              e.DisplayText = (int)e.Value == (int)enmSystemstatus.Created ? "Active" : "Deleted";
          }
      }
  </code></pre>
  
  <p>But the program should also be possible to use the autofilter row but if I enter a letter in the searchbox for the systemstatus column the program crashes because it is not possible to convert these values the exception is called: </p>
  
  <blockquote>
    <p>"system.invalidcastexception specified cast is not valid."</p>
  </blockquote>
  
  <p>This is probably because the column on the database is an integer column but changing it to varchar doesn't affect something</p>
  
  <p>Has anybody a solution for this?</p>
  
  <p>thanks in advance</p>