Check box inside a gridview
In my application , inside a grid view each and every row contains a check box. 开发者_运维技巧After clicking that check box i have to access the entire row data. But iam unable to find that row. Can any one help ?
try this code it may helps..
protected void RdbLstStudentType_SelectedIndexChanged(object sender, EventArgs e) {
GridViewRow gridRow = ((sender as CheckBox).Parent).Parent as GridViewRow;
int currentRowIndex = gridRow.RowIndex;
}
by using this currentrowindex, you can access the entire row .
精彩评论