Sunday, June 29, 2014

get checkbox checked in gridview in asp.net

 foreach (GridViewRow row in GridView1.Rows)
        {
            if (row.RowType == DataControlRowType.DataRow)
            {
                CheckBox chkRow = (row.Cells[0].FindControl("chkRow") as CheckBox);
                if (chkRow.Checked)
                {
                    string name = row.Cells[1].Text;
               
                }
            }
        }

No comments:

Post a Comment