DetailsView integer type conversion error?

Incorrect:

if (Convert.ToDouble(ItemsDetailsView.Rows[3].Cells[1]) < 0)
{
  ItemsDetailsView.Rows[3].Cells[1].CssClass = "changefont";
}



The above code will raise the follwing error message. "Unable to cast object of type 'System.Web.UI.WebControls.DataControlFieldCell' to type 'System.IConvertible'. "

The above error is raised when we forget to add ".Text" when retrieving the value of a field.

Correct:

if (Convert.ToDouble(ItemsDetailsView.Rows[3].Cells[1].Text) < 0)
  {
       ItemsDetailsView.Rows[3].Cells[1].CssClass = "changefont";
  }