Hi I have a RadGrid control showing three levels of detail ie a RadGrid with two detail tables
Level One --> account, name
Level Two ----> service, details
Level Three ------> service item, usage, date...
I need to allow download of just the selected detail level from the RadGrid.
I can Export either the entire Level One Grid or all the expanded grid fields but not the selected data. Exporting the etire grid gives me an Out of Memory Error with 4Gb RAM
Here's my ASPX
Here's the export code on the button.
I've seen a post of someone who had a similar issue but I've not seen a solution anywhere. I'm assuming I might have to use some sort of event capture and loop accordingly?
Thanks
Level One --> account, name
Level Two ----> service, details
Level Three ------> service item, usage, date...
I need to allow download of just the selected detail level from the RadGrid.
I can Export either the entire Level One Grid or all the expanded grid fields but not the selected data. Exporting the etire grid gives me an Out of Memory Error with 4Gb RAM
Here's my ASPX
<mastertableview autogeneratecolumns="False" datakeynames="AccountId" datasourceid="SqlDataSource1" groupsdefaultexpanded="False"><telerik:CommandItemSettings ShowExportToExcelButton="true" /> <DetailTables> <telerik:GridTableView runat="server" DataKeyNames="StatementId" DataSourceID="SqlDataSource2" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" > <DetailTables> <telerik:GridTableView runat="server" DataSourceID="SqlDataSource3" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" GroupsDefaultExpanded="False" ShowFooter="True" ShowGroupFooter="True" AllowMultiColumnSorting="True" GridLines="None"> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="StatementId" MasterKeyField="StatementId" /> </ParentTableRelation> <AlternatingItemStyle BackColor="White" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Wrap="True" /> <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Wrap="True" /> <FooterStyle BackColor="Yellow" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" Wrap="True" /> </telerik:GridTableView> </DetailTables> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="AccountId" MasterKeyField="AccountId" /> </ParentTableRelation> <CommandItemSettings ExportToPdfText="Export to Pdf" /> <ExpandCollapseColumn Visible="True"> </ExpandCollapseColumn> </telerik:GridTableView> </DetailTables> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="AccountId" MasterKeyField="AccountId" /> </ParentTableRelation> <ExpandCollapseColumn Visible="True"> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="ACCOUNTID" DataType="System.Int32" HeaderText="ACCOUNTID" SortExpression="ACCOUNTID" UniqueName="ACCOUNTID"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ACCOUNTREF" HeaderText="ACCOUNTREF" SortExpression="ACCOUNTREF" UniqueName="ACCOUNTREF"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CUSTOMERID" DataType="System.Int32" HeaderText="CUSTOMERID" SortExpression="CUSTOMERID" UniqueName="CUSTOMERID"> </telerik:GridBoundColumn> </Columns> </mastertableview>Here's the export code on the button.
protected void Button4_Click(object sender, System.EventArgs e) { //ConfigureExport(); RadGrid1.Rebind(); RadGrid1.MasterTableView.HierarchyDefaultExpanded = true; //RadGrid1.MasterTableView.DetailTables[0].HierarchyDefaultExpanded = true; RadGrid1.ExportSettings.IgnorePaging = true; RadGrid1.ExportSettings.ExportOnlyData = true; RadGrid1.ExportSettings.FileName = "RadGridExportToCSV"; RadGrid1.ExportSettings.OpenInNewWindow = true; RadGrid1.MasterTableView.ExportToCSV(); }I've seen a post of someone who had a similar issue but I've not seen a solution anywhere. I'm assuming I might have to use some sort of event capture and loop accordingly?
Thanks