Hey
Using your latest dotConnect for MySQL components of Version (5.80)
I do have the following situation:
I use Master-Detail tables to display the data of my articles.
As example: Master table holds Article and ID, Detail holds MastersID and Stock
In my grid, I bind my articles like:
BindingSource.DataSource = From Articles in myDataContext.Article
Grid.DataSource = BindingSource
I use defered loading. - so, when the user clicks on the article, on a second grid, the stock of the article is displayed.
GridDetail.DataSource = DirectCast(BindingSource.Current, myDataContext.Article).Details
My question now is: When a user user sells the article, then the stock isn't up to date anymore. - So I have to refresh my data.
How to do so?
THX
How to...
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
To apply the changes made in your grids to the database, you need to execute the SubmitChanges method of your DataContext instance. For example, you can do it when the list of the binding source changes:
Please tell us if you are encountering any problems with this. If you are, please specify the scenario in which they occur.
Code: Select all
private void bindingSource1_ListChanged(object sender, ListChangedEventArgs e) {
myDataContext.SubmitChanges();
}