Get Values From Grid View To Update it

Hi Folks,

i got a question from one of our boomers to how can he get values from gridview to update values.
here,is the answer.

Way #1 :
string test = MyGV.Rows[indx].Cells[1].Text ;

Way #2 : if you want to get DataKey value from GridView
string test=MyGV.DataKeys[0].Value.ToString()

Way #3:

((GridView)e.CommandSource).Rows[0].Cells[2].Text


let me know if you need any other help my friend “Raheel Rasheed”.


Regards,
Moustafa arafa

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>