3
Answers

How can I get rowindex in gridview ?

kareem elhosseny

kareem elhosseny

16y
21.6k
1
How can I get rowindex in gridview
I have gridview with 2 template column one of them are dropdownlist and the secound field is label

when i select on the dropdownlist the value showed in the label in the secound field

i want to know the rowindex in gridview
i used this code
mygridview.SelectedRow.RowIndex;

but it not work it return to me -1

please help me
Answers (3)