I have a datagridview on a windows form application.
Application post all displayed data to an external website. website return codes so application detrmine status of posted data.
I need to create a parametrized thread that take row index as parameter and post the row data and update it by return value.
(It may involve changing row background color and changing a columns value)
Is it possible the way i think? or there is a better way?
Well, since the DataGridView is a GUI control, you will not be able to make changes to it from another thread. You will have to send a message to the main GUI thread. Fortunately, C# has good support for this. Write a method (presumably in your main form class) which does the actual work:
Then, within your thread, use the
Invokemethod on the form object (not the delegate):So presumably you would run your HTTP request in a thread like this: