Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: ASP
Posted by: Mario Lopes
Added: Sep 14, 2018 2:38 PM
Views: 8
Verificar quais as checkBox clicadas na gridview
  1. protected void Button1_Click(object sender, EventArgs e)
  2.    {
  3.        lblResult.Text = "";
  4.        foreach (GridViewRow row in GridView1.Rows)
  5.        {
  6.            CheckBox chkbox = (CheckBox)row.FindControl("CheckBox1");
  7.            if (chkbox.Checked == true)
  8.            {
  9.                lblResult.Text = lblResult.Text +" "+ row.Cells[2].Text;
  10.            }
  11.        }
  12.  
  13.    }