Setting BackColor to items in DropDownList bound to ObjectDataSource inside DetailsView
<p>how do you properly call methods inside custom binding expressions? Are there complications because the dropdownlist is inside a detailsview?</p>

<p>asp.net code:</p>

<pre><code>&lt;asp:DropDownList ID="ddlExceptionEditStatus" runat="server"
      DataSourceID="odsExceptionsStatus"
      DataTextField="Name"
      DataValueField="StatusID"
      SelectedValue='&lt;%# Bind("StatusID") %&gt;' 
      BackColor="&lt;%# SetBackColorProp(Container.DataItem) %&gt;"&gt;
 &lt;/asp:DropDownList&gt;
</code></pre>

<p>code behind:</p>

<pre><code>protected System.Drawing.Color SetBackColorProp(object o)
{
    System.Drawing.Color statusColor = System.Drawing.Color.White;
    string statusName = o as string;
    if (statusName != null)
    {
        statusColor = System.Drawing.ColorTranslator.FromHtml(FISBLL.StatusColors.GetColor(statusName));
        return statusColor;
    }
    else
    {
        return statusColor;
    }        
}
</code></pre>

<p>Doesn't change the backcolor.  but doesn't throw an exception.</p>
