开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜