I have a grid in asp, with data keys say ‘job_no’ ,
I provided a onrowedit event and stored the event pararameter in ‘e’ as usual,like this
protected void gvDetails_RowUpdating(object sender, GridViewUpdateEventArgs e)
but when I try to access the relevant data key value of the row using row index like this,
int id = Convert.ToInt32(gvDetails.DataKeys[e.RowIndex].Value.ToString());
,it gives me an error saying ‘e’ doesn’t have a property called RowIndex.
Why is this happening ,is there any other way to get the data key value for the current row which is edited?
Correct one is as follows: