I've got a GridView control (GridView1) containing several fields
(Field1, Field2, ...) from a SQL table
If I set the selected row using: GridView1.SelectedIndex=1
Then how do I get the value of one of the fields in that row - say
Field2?
Sriram Surapureddy - 20 Jun 2007 13:39 GMT
you can use
((TextBox)GridView1.SelectedRow.FindControl("controlname")).text
assuming the field is type of textbox.You can typecast it wahtever the type
of the control.
Hope this helps
> I've got a GridView control (GridView1) containing several fields
> (Field1, Field2, ...) from a SQL table
[quoted text clipped - 3 lines]
> Then how do I get the value of one of the fields in that row - say
> Field2?