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;

Comments

Popular posts from this blog

How to find client's MAC Address in Asp.Net and C#.net

ASP.NET Session States in SQL Server Mode

Use XML Data For Save in Database