0

I have a gridview and set a DataKeyNames to ID (DataKeyNames="ID"). In this GridView I crate a column to select a row by Select command. I want to get row id by datakeyname but I can't do it.

Think my Gridview rows are

1
3
4
6
9
10
15

Numbers are taken from the database and the gridview are used. Please help me. If need more details say.

Thanks!

Lion
  • 18,729
  • 22
  • 80
  • 110

1 Answers1

0

you have to assign rowindex in rowdatabound event to your command then then pass that in command argument found a very nice article about this here

Community
  • 1
  • 1
Adil
  • 146,340
  • 25
  • 209
  • 204