This is a migrated thread and some comments may be shown as answers.

BackgroundWorker Threading Problem

2 Answers 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 12 Feb 2008, 05:03 PM

We have developed a program used by our printing department that allows them to view all letters in a queue, select a few letters, and then print these letters. I'm using the Telerik GridView to display the letters on a WinForm. A BackgroundWorker is being utilized to handle the merging and print processes. Once the worker has completed work we used the worker_RunWorkerCompleted method to refresh the data in my DataAdapter. This seems to be working each time we go through the method. Before leaving the completed method I would like to refresh the GridView with the new data in the DataAdapter. I did this by calling a Delegate to run the following code:

formLetterPrint.radGridView1.DataSource = formLetterPrint.dsLettersToPrint.Letter;

For some reason it will only refresh the GridView the first time we call the delegate. Each time after that it leaves me with a Blank GridView. If I re-sort the GridView my data shows as inteneded. Any ideas?

2 Answers, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
answered on 12 Feb 2008, 06:53 PM
I add this to my delegate and it seems to be working.  Is there a better way?

formLetterPrint.radGridView1.DataSource =

null;

formLetterPrint.radGridView1.DataSource = formLetterPrint.dsLettersToPrint.Letter;

0
Jack
Telerik team
answered on 13 Feb 2008, 12:14 PM
Hi Chris,

Thank you for contacting us.

This is a known issue and we are currently working on addressing it. The updated version will be made available in our upcoming release Q1 2008.

Do not hesitate to write us, if you need further assistance.

All the best,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Chris
Top achievements
Rank 1
Answers by
Chris
Top achievements
Rank 1
Jack
Telerik team
Share this question
or