Get hidden column value in Gridview

CSS: .hideGridColumn {display: none;}

ASP.NET: <asp:BoundField DataField = “AddressID” HeaderText = “AddressID” HeaderStyle-CssClass = “hideGridColumn” ItemStyle-CssClass = “hideGridColumn” />

C#: //Create a list of integer to store selected AddressId

List<int> lstAddressId = new List<int>();

Control chkSelect = null;

for(int iRow = 0; iRow < gvAddress.Rows.Count; iRow++){

//Find checkBox control in GridView

chkSelect = gvAddress.Rows[iRow].Cells[0].FindControl(“chkSelect”);

if(chkSelect != null){

//If CheckBox is checked then add AddressId of selected row in List by using gvAddress.Rows[iRow].Cells[1].Text property


int iAddressId = (int)gvAddress.Rows[iRow].Cells[1].Text;