Follow below code.It explains the action required by you on
button click:
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["yourstring name"].ConnectionString;
conn.Open();
DataTable dtable = new DataTable();
dtable.Columns.Add(new DataColumn("field name", typeof(string)));
Session["dt"] = dtable;
foreach (GridViewRow gvrow in yourgridview.Rows)
{
CheckBox chk = (CheckBox)gvrow.Cells[3].FindControl("yourcheckbox");
if (chk != null && chk.Checked)
{
dtable=(DataTable)Session["dt"];
DataRow dd = dtable.NewRow();
dd["field name"] = (gvrow.Cells[1].Text);
dtable.Rows.Add(dd);
GridView1.DataSource = dtable;
GridView1.DataBind();
Session["dt"] = dtable;
}
}
}