by APIJunkie
3. September 2009 19:54
I recently stumbled upon a not very well documented "design feature" that took me a couple of hours to track down.
If you are defining a custom delete function for an ObjectDataSource you must also remember to define the DataKeyNames property of the GridView you are working with. If you do not remember to do this, the object’s value passed to your delete function will be null.
You can read more about the ObjectDataSource delete issue here.
Hope this helps!