How to Get cell index in gridview
<p>I'm using a website(asp.net,C#) to view some details in gridview. In that gridview I have generated checkboxes dynamically. So it will be placed any cell inside of that gridview. I find that control in grdview by using FindControl(), but I cant get that cell index... now I want to get that excact cell index which placed that checkbox. How shall I get that cell index?</p>

<p>Please anyone Tell me the solution of this problem.</p>

<p>Thanks in advance.</p>

<p>My code for getting that Control is:</p>

<pre><code>if (HeaderCell.Text.Contains(strColumnName))
{
    CheckBox chk = GrdDynamicControls.Rows[index].FindControl(chkCheckBox1.ID) as CheckBox;
    chk.Checked = true;
    strCelValue = chk.Checked.ToString();
}
</code></pre>
