G
Guest
Hi,
I have a DataGridView, bounded to a DataTable which is populated/updated by
a OleDbDataAdapter (with OleDbConnection) to an Access Database. (Sounds
familiar to some of you ... I have posted a number of related questions
already.)
I want to have a worker thread starting to consume data from the DataTable.
Imagine that the DataTable contains a list of tasks. From the C# .NET
specification, DataTable "is safe for multithreaded read operations. You must
synchronize any write operations."
If the DataTable is managed programatically, e.g. not bound to a
DataGridView, the programming and testing shouldn't be too bad to create a
tread-safe application. However, my DataTable is bound to a DataGridView,
and I am concerned about the "random" updates made by the users. It's
probably wrong to assume any programatic/systematic behaviour by the users.
Is there a catch-all event between DataGridView and DataTable, such that I
can "lock" (or create a critical region) to control "Add", "Delete" and
"Update" to the DataTable? My worker thread will access the DataTable
directly, as programatic access to DataGridView is not allowed.
Or if anyone can advice me of any programming pattern for this type of set
up, I am all ears.
Thanks in advance.
I have a DataGridView, bounded to a DataTable which is populated/updated by
a OleDbDataAdapter (with OleDbConnection) to an Access Database. (Sounds
familiar to some of you ... I have posted a number of related questions
already.)
I want to have a worker thread starting to consume data from the DataTable.
Imagine that the DataTable contains a list of tasks. From the C# .NET
specification, DataTable "is safe for multithreaded read operations. You must
synchronize any write operations."
If the DataTable is managed programatically, e.g. not bound to a
DataGridView, the programming and testing shouldn't be too bad to create a
tread-safe application. However, my DataTable is bound to a DataGridView,
and I am concerned about the "random" updates made by the users. It's
probably wrong to assume any programatic/systematic behaviour by the users.
Is there a catch-all event between DataGridView and DataTable, such that I
can "lock" (or create a critical region) to control "Add", "Delete" and
"Update" to the DataTable? My worker thread will access the DataTable
directly, as programatic access to DataGridView is not allowed.
Or if anyone can advice me of any programming pattern for this type of set
up, I am all ears.
Thanks in advance.