When you autoGenerate a Select button with a Gridview, to find the RowIndex for that particular row, you can use the SelectedIndexChanged Event.
Inside that event, try something like this (with a label called 'Label1':
Dim row As GridViewRow = MyGridView.SelectedRow
Dim intRow as Integer=Row.RowIndex
label1.text=intRow.ToString
or
GridViewRow gvr = new GridViewRow();
gvr = dgdManageUsers.SelectedIndex;
int introw = gvr.RowIndex;
label1.text=intRow.ToString;
Google Brother Up
2008/01/04
Get Row Index with Gridview Select Button
Labels:
GridView,
Row,
RowIndex,
SelectedIndexChanged,
SelectedRow
Subscribe to:
Post Comments (Atom)
Drop Down List
1. http://www.janetsystems.co.uk/Articles/NetArticles/tabid/74/itemid/161/modid/449/Default.aspx
No comments:
Post a Comment