Hi,
I am using 2 level telerik radgrid to display information for purchase order(PO) and purchase order(PO) line items. I already have export to excel which exports the data into an excel sheet including the filters applied on the grid. i.e when we apply a filter on grid and click on export it only exports the data present in the filtered grid.
I have a new requirement to export the grid data into multiple worksheet in the single excel file. i.e. PO information should be exported to 1st worksheet in the excel file and PO line items information should be exported to 2nd worksheet in the same excel file. I also need to change the header information in the export. e.g. PurchaseOrderId will be renamed to PoId and so on. When a filter is applied it should only export the filtered information.
Please let me know if this is feasible. If yes, it would be great if sample code can be included. Any help would be appreciated. Thanks in advance.
Please find some more details for current implementation.
<telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="false" AllowPaging="True" AllowFilteringByColumn="true"
runat="server" AllowSorting="true" OnNeedDataSource="RadGrid1_NeedDataSource" GroupingSettings-CaseSensitive="false"
GridLines="None" EnableLinqExpressions="false" ExportSettings-IgnorePaging="True" ExportSettings-Excel-Format="Html"
MasterTableView-CommandItemDisplay="Top" ExportSettings-ExportOnlyData="true" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
OnItemCommand="RadGrid1_OnItemCommand">
<MasterTableView DataKeyNames="PurchaseOrderId">
<DetailTables>
<telerik:GridTableView runat="server" DataKeyNames="PurchaseOrderItemId" Name="1" Width="100%" HierarchyLoadMode="Client" AllowSorting="False" AllowFilteringByColumn="False">
<Columns>
<telerik:GridBoundColumn ...... ></telerik:GridBoundColumn>
<telerik:GridBoundColumn ...... ></telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridBoundColumn ...... ></telerik:GridBoundColumn>
<telerik:GridBoundColumn ...... ></telerik:GridBoundColumn>
</Columns>
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"
ShowRefreshButton="false" />
</MasterTableView>
<GroupingSettings CaseSensitive="false" />
</telerik:RadGrid>
Thanks.
I am using 2 level telerik radgrid to display information for purchase order(PO) and purchase order(PO) line items. I already have export to excel which exports the data into an excel sheet including the filters applied on the grid. i.e when we apply a filter on grid and click on export it only exports the data present in the filtered grid.
I have a new requirement to export the grid data into multiple worksheet in the single excel file. i.e. PO information should be exported to 1st worksheet in the excel file and PO line items information should be exported to 2nd worksheet in the same excel file. I also need to change the header information in the export. e.g. PurchaseOrderId will be renamed to PoId and so on. When a filter is applied it should only export the filtered information.
Please let me know if this is feasible. If yes, it would be great if sample code can be included. Any help would be appreciated. Thanks in advance.
Please find some more details for current implementation.
<telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="false" AllowPaging="True" AllowFilteringByColumn="true"
runat="server" AllowSorting="true" OnNeedDataSource="RadGrid1_NeedDataSource" GroupingSettings-CaseSensitive="false"
GridLines="None" EnableLinqExpressions="false" ExportSettings-IgnorePaging="True" ExportSettings-Excel-Format="Html"
MasterTableView-CommandItemDisplay="Top" ExportSettings-ExportOnlyData="true" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
OnItemCommand="RadGrid1_OnItemCommand">
<MasterTableView DataKeyNames="PurchaseOrderId">
<DetailTables>
<telerik:GridTableView runat="server" DataKeyNames="PurchaseOrderItemId" Name="1" Width="100%" HierarchyLoadMode="Client" AllowSorting="False" AllowFilteringByColumn="False">
<Columns>
<telerik:GridBoundColumn ...... ></telerik:GridBoundColumn>
<telerik:GridBoundColumn ...... ></telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridBoundColumn ...... ></telerik:GridBoundColumn>
<telerik:GridBoundColumn ...... ></telerik:GridBoundColumn>
</Columns>
<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"
ShowRefreshButton="false" />
</MasterTableView>
<GroupingSettings CaseSensitive="false" />
</telerik:RadGrid>
Thanks.