I have a List object which will get updated from a service application. I want to bind and update the data grid view with this List object asynchronously in a background thread without affecting the UI.
Any help will be appreciated

Thanks
Anilal Sambasivan

Krishna GaradRank #191 · 12.8K reputationPosted Mar 8, 2011, 9:56 PM EST
Anilal Sambasivan6 reputationPosted Mar 8, 2011, 10:42 PM EST
Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 8, 2011, 11:23 PM EST
Use a background worker thread to execute work in the background.
Here is example how to do it:
private BackgroundWorker bw = new BackgroundWorker(); public Form1() { InitializeComponent(); //Configure the Background worker bw.WorkerReportsProgress = true; bw.WorkerSupportsCancellation = true; bw.DoWork += new DoWorkEventHandler(bw_DoWork); } private void bw_DoWork(object sender, DoWorkEventArgs e) { // Perform bind the grid to the list } Now add a Timer Event to continuous call the background worker after a time span(let say 10 sec) and call the worker.RunWorkerAsync(); Hope this make sense to you.. and help you. ThanksSuthish NairRank #92 · 22.8K reputationPosted Mar 10, 2011, 8:18 AM EST
Anilal Sambasivan6 reputationPosted Mar 10, 2011, 9:23 PM EST
Initialize thread and delegate delegate
void Bind_DataTable_to_GridView_Delegate(DataTable dt);
Thread tBindGrid;
Thanks for your support
Anilal Sambasivan
http://anilalsambasivan.blogspot.com/