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

Asynchronously export data (XBAP)

2 Answers 102 Views
GridView
This is a migrated thread and some comments may be shown as answers.
mariusz piatek
Top achievements
Rank 1
mariusz piatek asked on 05 Mar 2011, 05:47 PM

Hello,

I wan to export data asynchronously. During exporting I want to display progress bar.

Here is the code, with is working, but unfortunatelly not asynchronously - my UI is still freezed. I think it's because of Dispatcher. I have to use dispatcher because grid is created in another thread. So even if I created separated thead function grid.Export() is still invoked by main UI thread.

How I can resolve this problem?

ThreadStart start = delegate()
            {
                grid.Dispatcher.Invoke((EventHandler)delegate(object ss, EventArgs ee)
                {
                    grid.Export(ms);
                }, new object[2]);
            };
            new Thread(start).Start();

2 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 06 Mar 2011, 12:54 AM
Hello mariusz piatek,

 You are right - by invoking the Export method of RadGridView via its Dispatcher, you effectively move the invocation to the UI thread. Unfortunately there is currently no way to export a RadGridView in another thread. We are looking to improving our export system with this and other new features soon.

Regards,
Yavor Georgiev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
mariusz piatek
Top achievements
Rank 1
answered on 07 Mar 2011, 07:25 AM
Thanks,
We are waiting for improvements.

Regards


.
Tags
GridView
Asked by
mariusz piatek
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
mariusz piatek
Top achievements
Rank 1
Share this question
or