开发者

Auto Update DataGrid after data insert/delete

I'm using LINQ to entities to insert and delete data from a DataGrid that is 开发者_如何学运维displayed on the homepage of my WPF application. I was wondering if there was a way or a DataGrid feature that would make my DataGrid auto-update and show changes upon insert/delete by itself rather than me having to re-execute the LINQ query that fills the datagrid (which is how i am achieving this now).

Thanks in advance.


Yes, bind your datagrid to an ObservableCollection<T>, or even better, to an Asynchronous Multi-threaded ObservableCollection...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜