int iRowIndex = Convert.ToInt32(e.CommandArgument);
switch (grd.ID.ToString())
{
case "grd1":
{
int index = Convert.ToInt32(e.CommandArgument);
LinkButton lnkAmt = new LinkButton();
lnkAmt = (LinkButton)sender;
GridViewRow gvr = lnkAmt.NamingContainer as GridViewRow;
GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
break;
}
}
}
catch (Exception ex)
{
string s = ex.Message;
}
finally
{
}
}
How to access the selected row in gridview row command and button filed in the selected row.I tried to access selected gridview row by 2 ways. But nothing worked out.