Hi all,
I am trying to selected the row in a Gridview in asp.net.
My code for selecting the row is like this:
GridViewRow row = GVDetails.SelectedRow;
But i do not see the data ... is there some other way of selecting the row? searched a lot but no use.. plzz help
GridView selected row has no data
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Suthish NairRank #92 · 22.8K reputationPosted Jul 26, 2011, 9:37 PM EDT
Kavita B135 reputationPosted Jul 26, 2011, 9:52 PM EDT
Calling that on onrowupdating="GVDetails_RowUpdating"...
I have an edit linkbutton on click i get 2 linkbuttons ie update and cancel..
Suthish NairRank #92 · 22.8K reputationPosted Jul 26, 2011, 10:16 PM EDT
Ok, then you need to use e.RowIndex to find the row value..
GridViewRow row = GVDetails.Rows[e.RowIndex];
Why dont' refer an msdn article
Kavita B135 reputationPosted Jul 27, 2011, 1:08 AM EDT
Sir how can we work on dynamic gridview ?