Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / ASP.NET

Index of current row in gridview - RowCommand event

1.80/5 (4 votes)
9 Mar 2010CPOL 1  
GridViewRow row = (GridViewRow)(((ImageButton)e.CommandSource).NamingContainer);int selIndex = row.RowIndex;
GridViewRow row = (GridViewRow)(((ImageButton)e.CommandSource).NamingContainer);

int selIndex = row.RowIndex;

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)