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

[Solved] Export Hierarchal RadGrdi

3 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saqib
Top achievements
Rank 1
Saqib asked on 08 Apr 2009, 09:07 PM
Hi,
    I am trying to find a sample code which deals with exporting Hierarchal RadGrid. Can anybody point me in right direction how to achieve this goal?

Thanks
Saqib

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Apr 2009, 04:14 AM
Hi ,

Try the following code snippet and see whether it helps.

CS:
 
protected void Button1_Click(object sender, EventArgs e)  
    {  
        RadGrid1.MasterTableView.HierarchyDefaultExpanded = true;  
        RadGrid1.MasterTableView.Rebind();  
        RadGrid1.ExportSettings.ExportOnlyData = true;  
        RadGrid1.ExportSettings.OpenInNewWindow = true;  
        RadGrid1.MasterTableView.ExportToExcel();  
   
      
         
    } 


Shinu
0
Saqib
Top achievements
Rank 1
answered on 01 May 2009, 08:05 PM
Thanks Shinu that worked, but it's not working when i changed export format from Excel to ExcelML. On button click it shows the dialog box to open or save an excel file but that excel file doesn't contain any data. Does Hierarchal RadGrid Export works with ExcelML format?

Thanks
Saqib
0
Pavlina
Telerik team
answered on 04 May 2009, 12:36 PM
Hello Saqib,

For your convenience I am sending you a sample application. Please find it attached to this post.
Give it a try and see if it works for you.

Best regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Saqib
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Saqib
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or