I found the answer in the MSDN:
To determine the index of the record that raises the command event, use the
CommandArgument property of the event argument that is passed to the command
event for the data-bound control. The ButtonField class automatically
populates the CommandArgument property with the appropriate index value.
Intellisense was not showing me a CommandArgument . That is why I got
confused. Now all I have to do is set different CommandNames for each
button in order to determine which one was clicked. Before, I set the
CommandName of both buttons to Select and then I was handling the
OnSelectedIndex Changed event. That was giving me the row, but not which
button fired the select.
"Mark Rae" <ma**@markNOSPA Mrae.comwrote in message
news:OI******** ********@TK2MSF TNGP03.phx.gbl. ..
"Yossi" <jo**********@f irstfi.comwrote in message
news:Oi******** ******@TK2MSFTN GP03.phx.gbl...
>Now how do I determine on which row that button is located?
Set the CommandArgument to the row's unique key.