Hi,
To get the values of controls and cells that placed in the Gridview. In Gridview Controls placed inside the item template and values placed inside as bound field. To retrieve those values in any of the button click event I have made a code to retrieve the values from Checkbox, dropdown list, label, Gridview cell.


C# Code


//loop to get each row values from gridview
foreach (GridViewRow row in grd_popup_details.Rows)
   {
     var cb_sty = (HtmlInputCheckBox)row.FindControl("CHK_STY");
     DropDownList ddl_distro = (DropDownList)row.FindControl("ddlDistros");
     Label lblClrID = (Label)row.FindControl("lblClrID");
     var sty_nbr = row.Cells[3].Text.Trim();
   }