R – Deleting from a subsonic collection bound to a winforms datagridview

collectionsdata-bindingdatagridviewsubsonic

I have a winforms application that I added a DataGridView bound to a subsonic collection via a BindingSource to it.

The grid works fine for adding/editing (except for the display of the ComboBox column) but I can't get it to delete rows correctly from the database.

If I delete a row from the DataGridView, I can't problematically determine that the collection is dirty and when I call the. BatchSave method of the subsonic collection it deletes all the rows.

Best Answer

In the 2.2 version SaveAll should also delete the items you removed from your datagridview.

In 2.1 you have to make a call to

ItemCollection.ProcessDeletedItems()

too

Related Topic