Pete and I for the past few weeks have been playing around with a project that returns a typed DataSet from a web service. Today we started on the "UpdateData" web method that accepts the typed DataSet and applies the changes back to the database.

One of the things we wanted to do was a bit of preprocessing on each row before it was applied. Coming from a code-based background (I've done all my ADO.NET web-services in code rather than using the visual DataSet desginer), I pointed out that SqlDataAdapter has a handy "RowUpdating" event that I've used, and so it logically must follow that the generated TableAdapters must have something similar.

Uh-uh.

Turns out that the only way you can get to any kind of RowUpdating/RowUpdated events is to handle them from within the TableAdapter, and the only way we could find to do that was to manually add a new class file to our web service project and code up the "other half" of the TableAdapter's partial class. We ended up adding a handler for _adapter.RowUpdating, and adding a public "InitEvents" method that hooked it up to the event. We then had to remember to call that "InitEvents" when we created the TableAdapter instance in the web method.

I don't know if I've missed something, but this seems like a very strange way to go about something as simple as handling an event. Why don't TableAdapters surface the RowUpdating and RowUpdated events of their internal "_adapter" variables to the IDE?