我有一个绑定到BindingSource
绑定到DataContext
表的网格,如下所示:
myBindingSource.DataSource = myDataContext.MyTable;
myGrid.DataSource = myBindingSource;
BindingSource
插入后无法刷新。这没有用:
myDataContext.Refresh(RefreshMode.OverwriteCurrentValues, myBindingSource);
myBindingSource.ResetBinding(false);
这都不是:
myDataContext.Refresh(RefreshMode.OverwriteCurrentValues, myDataContext.MyTable);
myBindingSource.ResetBinding(false);
我该怎么办?