2012/03/23

Get the Current Row Index on RowCommand event in Gridview Data Control

GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
int strCurrentRowIndex = row.RowIndex;
GridViewRow selectedRow = grdDetail.Rows[strCurrentRowIndex];
string clientname = selectedRow.Cells[0].Text;

0 comments:

Post a Comment