Try this:
foreach (GridViewRow row in GridView1.Rows)
{
CheckBox chk = (CheckBox)row.FindControl("Yourcheckboxname");
if(chk.Checked)
{
string strDummy= ((Label)row.FindControl("yourcolumnname")).Text;
}
}
Refer following thread:
Maintaining States of Selected CheckBoxes in Different Pages inside the GridView[
^]
Alternative:
protected void Button2_Click(object sender, EventArgs e)
{
if (GridView1.Rows.Count > 0)
{
for (int i = 0; i < GridView1.Rows.Count; i++)
{
CheckBox cbx = (CheckBox)GridView1.Rows[i].FindControl("CheckBox1");
if (cbx != null)
{
if (cbx.Checked)
{
string firstColumnValue = GridView1.Rows[i].Cells[0].Text;
Response.Write(firstColumnValue);
}
}
}
}
}