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

[Solved] Export "on-the-fly"-grid

3 Answers 62 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tim Tos
Top achievements
Rank 1
Tim Tos asked on 28 Sep 2010, 02:19 PM
Hello!

I want to export data of a gridView using the Export method.
The gridView is not on the screen, it is generated shortly before calling Export(...) in the code-behind file.
Although I am setting the DataContext and the ItemsSource the result is always empty (only the headers of the gridView).

How is it possible to export a gridView that is not visible on the screen?
Any ideas?

Thanks a lot,
Tim.

3 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 29 Sep 2010, 10:06 AM
Hi Tim Tos,

You may need to subscribe to the DataLoaded event of RadGridView  and inside the handler call the export method.

Another approach in your situation has a chance to do the trick as well - call the export method using Dispatcher.BeginInvoke ( .....


One of these should help ( depending on your specific scenario) .
Greetings,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tim Tos
Top achievements
Rank 1
answered on 29 Sep 2010, 12:01 PM
Hi Pavel Pavlov,

thanks for your answer! Unfortunately both methods didn't lead to success.
The BeginInvoke is producing the same results and the DataLoaded event is not fired (don't know why - data is there).

Thanks again for your help!
Tim.
0
Vlad
Telerik team
answered on 29 Sep 2010, 12:12 PM
Hi,

 Please send us (via support ticket) small example application where this can be reproduced. We will review your scenario and we will get back with more info. 

Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Tim Tos
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Tim Tos
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or