casting gridviewrow to a type datatablerow
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
i hav a table with schema id int name varchar i declare trow as personrow i bind it to a gridview onselectedindexchange i got the row selected by user as dim row as gridviewrow = gridview1.selectedrow how can i cast row to personrow
You don't. A GridViewRow represents the row in the GridView control, not the data inside it. You can use the returned GridViewRow object's DataItem propety to get a reference back to the data item that row is bound to.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...