How can I get rowindex in gridview ?

Jul 14 2008 11:06 AM
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)