title: Setting DevExpress ASPxCheckBox CheckState via Eval
body: <p>In ASP.Net 4.0, I'm trying to utilise the DevExpress ASPxCheckBox's ability to have "three states": checked, unchecked and indeterminate. I'd like to set this based on the value of a boolean: "Checked" when the boolean is true, "Unchecked" when false, and "Indeterminate" when null. To this end, I'm trying to use the following code in my page:</p>
  
  <pre><code> &lt;dx:ASPxCheckBox ID="cb_located" runat="server" AllowGrayed="true"  AllowGrayedByClick="true" CheckState='&lt;%# Eval("located") == DBNull.Value ? "Indeterminate" : (bool)Eval("PropertyLocated") == true ? "Checked" : "Unchecked" %&gt;' /&gt;   
  </code></pre>
  
  <p>However, this gives me the error</p>
  
  <blockquote>
    <p>CS0030: Cannot convert type 'string' to
    'DevExpress.Web.ASPxClasses.CheckState'</p>
  </blockquote>
  
  <p>Can anyone help me with the correct syntax please?</p>