I recently had an ImageButton in a DataGrid, and for whatever reason it wouldn’t fire the DataGrid.ItemCommand event. After beating my head on the keyboard for an entire day, I finally found the problem.
When you are binding the grid (or calling the method that handles the binding) in the page_load, you have to make sure that you include it in a not postback check. The ItemCommand event is a postback event, so if it’s just hanging out in the page load event, it will always rebind the grid when the page is loaded and destroy any postback events.
That’s what I was doing… doh.