0

I have two grids, gSummary and gInput. gSummary does a bit of data massaging (totals, etc) from the DB and gInput is where the user can directly modify the data itself.

I'm finding that the data is submitted correctly (the DB is successfully atomically updated at every change) but that unless I refresh the entire gSummary table, the gSummary info is out of date and I have to set the DataSource again. Is there some way I can update single rows, or somehow refresh the data without refreshing all the data?

edit: I'm using Linq to Sql.

4

2 回答 2

0

您可以使用ObservableCollection<T>然后自己管理更改。(这应该相当简单。)

于 2012-04-12T03:32:33.940 回答
0

答案是重新查询数据库,只查询更改的字段,这样整个事情就不必全部刷新。

所以LinqObject.RecalculateSummary()我没有在部分课程中调用DataAccessObject.recalculateSummary(LinqObject). 不是最好的解决方案,但对我有用。

于 2012-04-12T06:44:15.133 回答