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

RadGridViews batch export to excel

3 Answers 105 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 13 Jun 2012, 07:16 AM
Hi Telerik Team,

I have 5 RadGridViews placed in different RadPane inside RadPaneGroup. I need to implement batch export for these 5 grids with a single button export click. the problem is when the user never switch to other tab and straight away click on export button. the data would never been populated and the grids in will export empty data to excel (only grid headers are exported). is there a way to populate all data to grids before i run export to excel function?

Thanks,
James

3 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 15 Jun 2012, 01:35 PM
Hello James,

You can manually loop through the tabs on initial load, to populate the GridViews in the different tabs.
That way when you hit the export button all the data would have been populated and should be able to export it.

Hope this helps! 

Greetings,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
James
Top achievements
Rank 1
answered on 18 Jul 2012, 06:47 AM
Hi Nik,

Thanks for your reply. could you post a sample code on how to populate the gridview on the initial load in each radPane?
I called this code radGridView.ItemSource = [itemSource] for each radGridView in each radPane inside the constructor, but it doesn't work. It seems like it would populate the data only when I click on each radPane.

Regards,
James  
0
Nick
Telerik team
answered on 23 Jul 2012, 08:48 AM
Hello James,

Here is an example of how you can load all the panes at the initial load. Mind however that the scenario is not supported out of the box and the provided workaround is just an approach that has to be modified if you have more complex scenario.

Hope this helps! 

All the best,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
James
Top achievements
Rank 1
Answers by
Nick
Telerik team
James
Top achievements
Rank 1
Share this question
or