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

export radgrid detail table contents

3 Answers 250 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Priya
Top achievements
Rank 1
Priya asked on 16 Mar 2009, 04:26 AM
Hi,

I am using radgrid export..its working fine for mastertable view..but when i add detail tables to that grid, excel page is coming with blank rows for detailtable rows..it displays the mastertable view data only
I tried
grdProposalGroups.MasterTableView.DetailTables(0).ExportToExcel() 
but i m getting the error
RadGrid must be databound before exporting.

any solution to this prbm...

plz help me
thanks.....

3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 16 Mar 2009, 07:37 AM
Hello Priya,

Try out the following code instead to export the detail tables in a grid.
cs:
 protected void Button_Click(object sender, EventArgs e) 
    { 
        RadGrid1.MasterTableView.HierarchyDefaultExpanded = true
        RadGrid1.MasterTableView.Rebind(); 
        RadGrid1.ExportSettings.ExportOnlyData = true
        RadGrid1.ExportSettings.OpenInNewWindow = true
        RadGrid1.ExportSettings.IgnorePaging = true
         
        RadGrid1.MasterTableView.ExportToExcel(); 
   } 

Thanks
Princy.
0
Priya
Top achievements
Rank 1
answered on 16 Mar 2009, 08:17 AM
 If e.CommandName = "Export" Then  
            grdProposalGroups.MasterTableView.HierarchyDefaultExpanded = True 
            grdProposalGroups.Rebind()  
            grdProposalGroups.ExportSettings.OpenInNewWindow = True 
            grdProposalGroups.ExportSettings.ExportOnlyData = True 
            grdProposalGroups.ExportSettings.IgnorePaging = True 
            grdProposalGroups.MasterTableView.ExportToExcel()  
end if 
i tried with this

but not worked
0
Priya
Top achievements
Rank 1
answered on 18 Mar 2009, 06:10 AM
plz help me.......................
Tags
Grid
Asked by
Priya
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Priya
Top achievements
Rank 1
Share this question
or