title: ASPxComboBox 'specified cast is not valid' error when data binding
body: <p>I have a Dev Express ASPxComboBox:</p>
  
  <pre><code>&lt;dx:ASPxComboBox runat="server" ID="DropDownListTemplates"
      DataSourceID="SqlDataSourceTemplates" ValueField="template_id" TextField="name" 
      ValueType="System.Int32" Enabled="false" Width="100%" SelectedIndex='&lt;%# 
      Eval("subs_template") %&gt;'/&gt;
  </code></pre>
  
  <p>Which throws a "Specified cast is not valid error" at runtime. It's something to do with the</p>
  
  <pre><code>SelectedIndex='&lt;%# Eval("subs_template") %&gt;'
  </code></pre>
  
  <p>Expression, however, subs_template is guaranteed to be a number:</p>
  
  <pre><code>&lt;asp:SqlDataSource ID="SqlDataSourceClientDetail" runat="server"
          ConnectionString="&lt;%$ code: AutoNat.ConnectionManager.AutoNatConnectionString %&gt;"
          SelectCommand="SELECT *, isnull(subs_template_id, 0) subs_template FROM [person] p WHERE [person_id]=@person_id"&gt;
          &lt;SelectParameters&gt;
              &lt;asp:SessionParameter Name="person_id" SessionField="personID" Type="Int32" /&gt;
          &lt;/SelectParameters&gt;
      &lt;/asp:SqlDataSource&gt;
  
      &lt;asp:SqlDataSource ID="SqlDataSourceTemplates" runat="server" ConnectionString="&lt;%$ code: AutoNat.ConnectionManager.AutoNatConnectionString %&gt;"
         SelectCommand="SELECT * FROM 
                        (SELECT t.template_id, name FROM subs_template t UNION SELECT 0, 'Custom...') s 
                        ORDER BY template_id"&gt;
       &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>Why does this keep failing?</p>
  
  <p>I have tried</p>
  
  <pre><code>SelectedIndex='&lt;%# 0 %&gt;'
  </code></pre>
  
  <p>Which works fine!</p>