後,我有綁定到這勢必DataContext
表,像這樣的BindingSource
網格:清爽的BindingSource插入(LINQ to SQL中)
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);
我應該怎麼辦?