I made a query in which a gridview is populated, the columns are code, category, noprazo, foradoprazo. In the columns in the deadline and foradoprazo, I left them as linkbuttom
that when clicking on the resulting item line or late or deadline, I get the ID of the line clicked.
This runs on GridView1_RowCommand
as follows, but does not return the id of the clicked row.
What should I do?
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Detalhar")
{
chamadosEntities carga1 = new chamadosEntities();
int index = Convert.ToInt32(e.CommandArgument);
GridView1.SelectedIndex = index;
int codigoId = Convert.ToInt32(GridView1.DataKeys[index].Value);