Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi
I have a datatable bound to a datagridview, using a bindingsource object. I have an external server that sends updates to my program. When the program receives the updates, it adds a new row to the datatable containing the new information. As the datatable is bound to the datagridview, it also updates so the user can see the new information. My problem is that, the new data updates are passed to the programme on a seperate thread and so the datagridview is indirectly being updated by a thread other than the one it was created on. As the bindingsource automatically updates the datagridview when the datatable is updated, i cant figure out where i should invoke the datagridview. I looked at the bindingsource.ListChanged Event, but was not sure whether this is raised before the changed has been transmitted through to the datagridview.

Any Help would be much appreciated

Thanks very much in advance

J
Posted

1 solution

Your scenario is like chat application.
In which list is updated by the message.
Try search chat application , u may have idea to update your GridView.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900