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

Export to Excel - Hierarchy (Child) rows only excluding Parent rows

2 Answers 210 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Anwar
Top achievements
Rank 1
Anwar asked on 08 Mar 2013, 08:59 AM
Hi,

I would like to now whether the grid view are able to export the child rows only excluding the parent rows?

The reason is, for my task current parent rows are just there as a summary of the child rows in a hierarchical view. Therefore, it does have details that is useful for excel manipulations.

I understand that current grid view can export the grid parent rows and its hierarchy, however the output of the export is not clean and immediately ready for excel data manipulations, as it have repeating child headers and the child is indented one column from the left as screenshot of the existinghierarchyexport.png

So i would like to confirm whether it is possible to have it with the only expectedchildrowsonly.png

Regards

2 Answers, 1 is accepted

Sort by
0
Anwar
Top achievements
Rank 1
answered on 11 Mar 2013, 03:05 AM
Could someone, provide some information or alternatives ... Please?

I urgently need confirmation regarding this matter.

Thank you
0
Ivan Petrov
Telerik team
answered on 13 Mar 2013, 08:51 AM
Hello Anwar,

Thank you for writing.

Currently, the export mechanism does not support exporting only child data rows. However you can create an in-memory grid which contains only child table data and export it. For this to work you have to set the grid's BindingContext property to a new instance of BindingContext. This is needed to be able to bind the grid to the data. The rest is exactly the same as if you export a grid in the normal case. If you have any difficulties implementing this do not hesitate to write back and please include the schema of your data and the type of hierarchy you use for your grid.

I hope this will be useful. Feel free to write back with any further questions.

Greetings,
Ivan Petrov
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Tags
GridView
Asked by
Anwar
Top achievements
Rank 1
Answers by
Anwar
Top achievements
Rank 1
Ivan Petrov
Telerik team
Share this question
or