Question: I have a table with three columns (ProdID,ProdName,Status). I m fetching that into a dataSet and binding that to my gridview. I have a very basic and simple rowdatabound event like this :

```
 protected void gvProducts_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            if (e.Row.Cells[2].Text == "False")
            {
                e.Row.BackColor = System.Drawing.Color.PaleVioletRed;
            }
        }
    }

```

But when i see my 3rd column (Status), it is converted to a checkbox, may be becz its containing only 'True' or 'False'. Also in my if condition :

```
if (e.Row.Cells[3].Text == "False")

```

the text value is showing this :

> 
> ""
> 
> 
> 

Can anybody suggest me, how can i compare my status against True or False in my if condition.

Answer: 
Check if you have a **CheckBox** control in: 

```
e.Rows.Cells[3].Controls

```

Then you can get its **Checked** property: 

```
((CheckBox)e.Rows.Cells[3].Controls[0]).Checked

```
If the Status column is a bunch of checkboxes, then test whether the checkbox's `Checked` property is `true` or `false`.