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

[Solved] Don't want to export hierarchy

5 Answers 151 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 2
Michael asked on 22 Feb 2008, 06:39 PM
How can I export an Excel file minus the hierarchy data?

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 23 Feb 2008, 01:29 PM
Hi Michael,

Setting the following code just before the export should do the trick for you:

           RadGrid1.MasterTableView.HierarchyDefaultExpanded = false;
           RadGrid1.Rebind();


Best wishes,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael
Top achievements
Rank 2
answered on 23 Feb 2008, 02:15 PM
Hi Steve - I didn't do the ReBind()... I'll have to give that a go and see how it works.  Thanks.
0
Michael
Top achievements
Rank 2
answered on 24 Feb 2008, 03:41 PM
Unfortunately that method did not work for me.  And on closer inspection of the data in the Excel file - it appears that the first parent record is getting exported and then all of the children for ALL the parents are being exported.  So it doesn't even pull all parent/children - just the first parent and the rest of the children.  Odd.

Here's what I have:

    Protected Sub btnExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExport.Click
        rdgrdOpenOrders.ExportSettings.ExportOnlyData = True
        rdgrdOpenOrders.ExportSettings.IgnorePaging = True
        rdgrdOpenOrders.ExportSettings.OpenInNewWindow = True
        rdgrdOpenOrders.MasterTableView.HierarchyDefaultExpanded = False
        rdgrdOpenOrders.Rebind()
        rdgrdOpenOrders.MasterTableView.ExportToExcel()
    End Sub
0
Steve
Telerik team
answered on 26 Feb 2008, 02:32 PM
Hi Michael,

Unfortunately we were able to reproduce the issue and it is caused by the IgnorePaging="true" export setting. I've logged the problem and we will address it for one of the subsequents releases of the control.

Please excuse us for the temporary inconvenience. Your Telerik points have been updated.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Michael
Top achievements
Rank 2
answered on 26 Feb 2008, 02:42 PM
Hi Steve,

Although it's a downer that a bug has popped up, I can't help but feel warm and fuzzy for finding it and getting an increase in points.  LOL.

Look forward to hearing an update on the issue - thanks.
Tags
Grid
Asked by
Michael
Top achievements
Rank 2
Answers by
Steve
Telerik team
Michael
Top achievements
Rank 2
Share this question
or