set dropdownlist selectedIndex in gridview
<p>I have a grideview that is being populated by an ObjectDataSource. In the EditItemTemplate, I have a dropdownlist which gets populated thru the code behind on the RowDataBound event:</p>

<pre><code> ddStates.DataSource = snm.getStates();
 ddStates.DataTextField = "State";
 ddStates.DataValueField = "StateID";
 ddStates.DataBind();
</code></pre>

<p>Now, what i would like to do is set the selected index of my dropdownlist to the current value for the row from the objectDataSource.  How do I get the StateID from the ObjectDataSource?</p>

<p>Thanks, I have been running in circles on this one.</p>
