GridView does not contain a definition for Cells?
<p>I am trying to use the following code to check at least one checkbox has been selected. And if a checkbox is selected, a textbox in that row has some value in it. But it is giving me an error when I am using <code>Cells</code></p>

<p>The error is Gridview does not contain a definition for 'Cells' and no extension method 'Cells' accepting a first argument of type GridView could be found.</p>

<p>I am not sure why it is giving me this error. </p>

<pre><code>private Boolean checkIfChecked()
    {
        int check = 0;

        foreach (GridView row in gvPizzaOrder.Rows)
        {
            CheckBox chk = row.Cells[0].Controls[1] as CheckBox;
            if (chk.Checked)
            {
                check++;
                TextBox quantity = row.Cells[3].Text as TextBox;
                if (quantity.Text == "")
                {
                    return false;
                }

            }
        }//end forreach

        if (check == 0)
        {
            return false;
        }
        else
            return true;
    }//end checkIfChecked
</code></pre>