That's because I'm using the Edit built-in button in the GridView control so that when I hit the Edit button, the control's mode is changed to the Edit mode and the EditIndex property is set internally. And when the Update button is clicked, I can access the edit row in a seperate class with the above code. I'm not sure when you want to run that code, but if you use your own button, you can raise the Edit command like the built-in button by setting the CommandName as Edit. You might also try to have a look at the EditIndex value at runtime to diagnose your problem. The basic idea is that you need a way to determine the row that is being edited and the index of the row comes to mind as an option.