title: How can I set the Selected value on a DevExpress LookupEdit?
body: <p>I previously asked a similar question, but the code was much more complicated.  This question involves a similar problem, but the code is drastically simplified.  Still, even as simple as this example is, I can NOT get the dropdown to pre-select the correct value.</p>
  
  <p>I have a dropdown that is populated w/ values correctly.  Also, when I change the dropdown to any of the values, and then save my form, the database record is updated w/ the correct value.  That much is working, but selecting the correct value on form load will not work.</p>
  
  <p>I put these lines in my save method, just to see what I'm working with.</p>
  
  <pre><code>var test1 = _myLookupEdit.EditValue;  //evaluates to 2
  var test2 = _myLookupEdit.Properties.KeyValue;  //evaluates to 2
  </code></pre>
  
  <p>However, when I set either of these during form load, nothing happens; the dropdown has a blank entry selected (and the rest of the values are seen when you expand the dropdown).  I've tried each of these methods:</p>
  
  <pre><code>_myLookupEdit.EditValue = 2;
  _myLookupEdit.Properties.KeyValue = 2;
  </code></pre>
  
  <p>Edit - I posted a comment below under platon's answer, but I'll post it here as well.  I eventually used a stored procedure instead to populate this dropdown, instead of an Enum.  From that point on, the dropdown loaded w/ the correct selected value.</p>