开发者

Check box inside a gridview

开发者 https://www.devze.com 2023-02-06 10:36 出处:网络
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

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 .

0

精彩评论

暂无评论...
验证码 换一张
取 消