Get value of checkbox in gridview template field inside jquery ui dialog
<p>I have a gridview that is dynamically bound to a datasource. It has a template field with a checkbox in it. This gridview is also inside a jQuery UI dialog which is shown/displayed when a button is pressed.</p>

<p>Now, I am able to loop thru all the rows in the gridview, however when I get the checkbox control, the 'Checked' property is always false even when checked. What should I do to get the actual 'Checked' value of the rows?</p>

<p>The code for getting the value of the checkbox:</p>

<pre><code>foreach (GridViewRow dgRow in dgvInventoryList  .Rows)
{
    if(dgRow.RowType != DataControlRowType.DataRow)
    {
        continue;
    }

    chkSelected = (CheckBox)dgRow.FindControl("chkSelected");

    if(!chkSelected.Checked)
    {
        continue;
    }
</code></pre>

<p>I have tried debugging the code and it do get upto the if(!chkSelected.Checked) validation</p>
