DataGridView with LINQ fast autosave changes
I'm use DataGridView with LINQ BindingSource. And I need autosave changes after adding, editing or deleting rows by:
dataContext.SubmitChanges();
Now I'm use AddedRow, DeletedRow, ValueChanged events, but when user delete 1000 rows, this causes 1000 calls of "dataContext.SubmitChanges();" and this is ver开发者_开发技巧y slow.
How i can call "dataContext.SubmitChanges();" one time after adding, deleting or editing all rows?
It looks like you can use the List_Changed event of your bindingSource, like explained here: aving busniess object using a bindingsource
精彩评论