
Brian Dobberteen
Top achievements
Rank 1
Brian Dobberteen
asked on 17 Jun 2011, 08:04 PM
I am creating multiple grids in my page's code-behind and was hoping to be able to export them all at once. However, I cannot find any way to add these grids to a 'wrapper' grid's MasterTableView.Items collection as would be accomplished in the aspx like:
Is there any way to accomplish what I am after?
Thanks!
<
telerik:RadGrid
ID
=
"wrapper"
... >
<
MasterTableView
>
<
ItemTemplate
>
<
telerik:RadGrid
ID
=
"grid1"
... />
<
telerik:RadGrid
ID
=
"grid2"
... />
</
ItemTemplate
>
</
MasterTableView
>
</
telerik:RadGrid
>
Is there any way to accomplish what I am after?
Thanks!
5 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 18 Jun 2011, 06:57 AM
Hello Brian,
You can Export multiple RadGrid controls into single Excel/PDF file by using another RadGrid to wrap the contents. Check out the following code library for more on this.
Export multiple RadGrids in single PDF/Excel file.
Thanks,
Shinu.
You can Export multiple RadGrid controls into single Excel/PDF file by using another RadGrid to wrap the contents. Check out the following code library for more on this.
Export multiple RadGrids in single PDF/Excel file.
Thanks,
Shinu.
0

Brian Dobberteen
Top achievements
Rank 1
answered on 18 Jun 2011, 06:40 PM
Perhaps you did not read my post. I am creating my grids in code behind, not declaratively as is suggested in the link provided.
0
Hello Brian,
Indeed, it is possible to implement this by creating your own class that inherits from ITemplate as explained in this help topic:
RadGrid programmatic creation
I'm not sure, however, that this approach will be suitable for your scenario. Can you please post more information about your requirements so that I can try to provide an alternative way (if possible)?
I need to know which format do you use and what is the structure of your grids / how do you expect the exported file to look like?
Best regards,
Daniel
the Telerik team
Indeed, it is possible to implement this by creating your own class that inherits from ITemplate as explained in this help topic:
RadGrid programmatic creation
I'm not sure, however, that this approach will be suitable for your scenario. Can you please post more information about your requirements so that I can try to provide an alternative way (if possible)?
I need to know which format do you use and what is the structure of your grids / how do you expect the exported file to look like?
Best regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0

Brian Dobberteen
Top achievements
Rank 1
answered on 23 Jun 2011, 09:15 PM
Presently we are exporting one grid at a time in CSV format to individual files.
The grids are basic - no hierarchical/child grids or anything like that.
We are creating n grids based on the number of DataTables found in a DataSet object that is filled in code-behind.
All of this works great.
However, there was a recent request for an ability to export > 1 grids with a single click... Obviously, CSV is not conducive to containing multiple exports in one file, so we were interested in being able to export multiple grids to multiple worksheets within a single Excel file.
Is this enough info for you to go on? If so, is this scenario something that might be supported? If not, please let me know what else you'd need to know about our setup.
Thanks much!
The grids are basic - no hierarchical/child grids or anything like that.
We are creating n grids based on the number of DataTables found in a DataSet object that is filled in code-behind.
All of this works great.
However, there was a recent request for an ability to export > 1 grids with a single click... Obviously, CSV is not conducive to containing multiple exports in one file, so we were interested in being able to export multiple grids to multiple worksheets within a single Excel file.
Is this enough info for you to go on? If so, is this scenario something that might be supported? If not, please let me know what else you'd need to know about our setup.
Thanks much!
0
Hello Brian,
Please test the attached demo and let me know whether this approach is suitable for you. Note that you may need to traverse the controls collection of each grid and manually remove buttons, textboxes and IScriptControls.
Regards,
Daniel
the Telerik team
Please test the attached demo and let me know whether this approach is suitable for you. Note that you may need to traverse the controls collection of each grid and manually remove buttons, textboxes and IScriptControls.
Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.