How to suppress 'Save changes before closing?' dialog?

We have customized our Purchase Advisor by adding a few columns to two stock dataviews and creating a DataTable that’s associated with a new dataView. The customization populates fields in these dataViews when the part number changes.

I’ve tried to set RowMod = “” for the three dataViews after data is populated by the customization, but it’s not preventing the “Save changes before closing?” dialog from appearing.

Any ideas about how to suppress it?

Maybe try to clear the datasets on close?

That’s a great idea, but I can’t seem to find how to catch an event before that dialog shows up.

I’ve tried on Form_Closing and a beforeAdapter for the part, but the dialog comes up before anything else. I tried a trace to see if anything was firing, but nothing is registering.

I appreciate the thought!

Not sure how you are populating the dataview, but maybe using AcceptChanges() on it?

Jason Woods
http://LinkedIn.com/in/jasoncwoods

Bingo! I swapped out my failed RowMod setting attempts with this and it worked like a charm. Thanks, Jason!

someDV.dataView.Table.AcceptChanges();