I have a combobox in my WPF app that is databound to my list of objects in my View Model. When the user makes changes to the selected object and then selects another item befor
As well as using Marc's approach using DeleteOnSubmit (or DeleteAllOnSubmit) to remove the inserts, the following will actually undo any updates aswell:
// clears any updates.
ChangeSet changes = dataContext.GetChangeSet();
dataContext.Refresh(RefreshMode.OverwriteCurrentValues, changes.Updates);
Your best bet is probably to re-query into a separate data-context. You can negate an insert (from the change-set) by using DeleteOnSubmit
(and the reverse), but I'd rather not, myself.