I get Does not contain a definition for 'rowindex' error.any clue will be appreciated.
Code:
protected void btnConAd_Click(object sender, EventArgs e)
{
string valStr;
foreach (GridView gvRows in gvConAd.Rows)
{
CheckBox chkSelect = (CheckBox)gvRows.FindControl("chkSelect");
if (chkSelect.Checked)
{
valStr = valStr + gvConAd.DataKeys[gvRows.RowIndex].Values["contid"].ToString();
}
}
}