It really depends on what the other thread is doing, and what the user
is going to do. If what they are updating are separate, disparate parts of
the data, then nothing would happen. However, whether or not it is
disparate is something that is specific to your app and your data.
Regardless, it's not something I would consider allowing, unless you
have a severe need for it (in which case, you will have to find out how to
do it the right way, with proper synchronization).
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
shark said:
I'm going to do this (disable grid) but I just wonder what could happpen
Thx
SS
Nicholas Paldino said:
SS,
This scenario shouldn't be allowed to happen. You should be disabling
access to the data grid view while the thread is updating the underlying
data that the user is seeing in the grid.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
shark said:
OK, so
1. bindingsource.SuspenBinding
2. Thread is started
3. Thread is pulling data to dataset
4. User is working with DataGridView (which is unbound from dataset) and
is changing data in it
5. Thread stops
6. bindingsource.ResumeBinding
What will happen to my dataset ?
Thx
SS
I'm calling bindingsource.SuspenBinding just before Thread is started.
It
works fine, but my question is what will hapen to data is user change
it
manually and then I call bindingsource.ResumeBinding ?
Data will be overriden ? or merged?
It's not quite clear what sequence of events you're worried about.
Could you spell it out in more detail?