by thebeebs
26. September 2008 11:08
I was using an ObjectDataSource today, which is rare for me. Everything was working perfectly apart from the deletes. This was because updates and edits pass the full objects back to the ObjectDataSource, however, on delete commands only the properties that are set as Datakeys of the grid are populated and sent back.
In most instances this is fine because to delete an object all you should need is the Primary key. So make sure you add your primary Key as a DataKey for the grid if you want automatic deletes to work ..well…automatically.