M
Martin B
Hallo to everyone!
Problem:
--------
GridView Exception: reentrant call to the SetCurrentCellAddressCore function
System:
-------
WinXP Professional, english, .NET Framework 2.0 Beta Language C#
Simplified Architecture of my Porgram:
2 Forms:
--------
- MainForm
- DetailForm
2 Threads:
----------
- Main Thread which runs the MainForm //Application.Run(MainForm)
- Telegram Thread //receiving Socket Data for visualization
Scenario:
---------
Telegram Thread receives frequently (2s) socket data which forces the
Main Thread via Callback 'Visualization' to refresh the Data in
the GridView. Within the Callback function 'Visualization' the
Telegram Thread could return immediately, doing his job, by calling
this.Invoke(new VisualDelegate(MainFormVisual)).
'MainFormVisual' wires up the GridView.DataSource with a DataTable,
which is stored offline in memory, as shown in the following lines
1. gvMyGridView.DataSource = null;
2. gvMyGridView.DataSource = BuildActData(); //returning a DataTable
After a undifined and non reproduceable timespan (approx. 20 min)
repating this scenario, the following Exception will be thrown at line 1:
EXCEPTION: Operation is not valid because it results in a reentrant call to
the SetCurrentCellAddressCore function.
Thank you for every advice, bugfix or workaround
Martin
Problem:
--------
GridView Exception: reentrant call to the SetCurrentCellAddressCore function
System:
-------
WinXP Professional, english, .NET Framework 2.0 Beta Language C#
Simplified Architecture of my Porgram:
2 Forms:
--------
- MainForm
- DetailForm
2 Threads:
----------
- Main Thread which runs the MainForm //Application.Run(MainForm)
- Telegram Thread //receiving Socket Data for visualization
Scenario:
---------
Telegram Thread receives frequently (2s) socket data which forces the
Main Thread via Callback 'Visualization' to refresh the Data in
the GridView. Within the Callback function 'Visualization' the
Telegram Thread could return immediately, doing his job, by calling
this.Invoke(new VisualDelegate(MainFormVisual)).
'MainFormVisual' wires up the GridView.DataSource with a DataTable,
which is stored offline in memory, as shown in the following lines
1. gvMyGridView.DataSource = null;
2. gvMyGridView.DataSource = BuildActData(); //returning a DataTable
After a undifined and non reproduceable timespan (approx. 20 min)
repating this scenario, the following Exception will be thrown at line 1:
EXCEPTION: Operation is not valid because it results in a reentrant call to
the SetCurrentCellAddressCore function.
Thank you for every advice, bugfix or workaround
Martin