We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Export to excel paged SfDataGrid

Hi,
I have problem regarding exporting paged SfDataGrid to excel using Xamarin.Android . I have created SfDataPager and set it's source to my IEnumerable<>, then I assigned SfDataGrid items source to SfDataPagers pagedSource and it all works fine. But when I export sfDataGrid to excel, I get just the current sfDataGrid page in file.xlsx. How can I get whole sfDataGrid in exported file (all pages)? (e.g. SfDataGrid for WinRT has exportOption.ExportAllPages). Thanks in advance. Here is my code below:

                DataGridExcelExportingController excelExport = new DataGridExcelExportingController();
               
                DataGridExcelExportingOption exportOption = new DataGridExcelExportingOption();
                exportOption.ExportHeader = true;
                exportOption.ExportRowHeight = false;
                exportOption.DefaultRowHeight = 30;
                exportOption.ExportColumnWidth = false;
                exportOption.DefaultColumnWidth = 150;
                exportOption.ExportGroups = true;
               
                var excelEngine = excelExport.ExportToExcel(sfDataGrid, exportOption);
                var workbook = excelEngine.Excel.Workbooks[0];
                MemoryStream stream = new MemoryStream();
                workbook.SaveAs(stream);
                workbook.Close();
                excelEngine.Dispose();
                //Save("DataGrid.xlsx", "application/msexcel", stream, sfDataGrid.Context);
                Save("DataGrid.xlsx", "application/msexcel", stream, sfDataGrid.Context);

1 Reply

DS Divakar Subramaniam Syncfusion Team February 6, 2017 12:37 PM UTC

Hi Stanicb, 
 
 
Sorry for the inconvenience. 
 
 
We have considered your query as a defect. We will fix this issue internally and the same will be included on our 2017 Volume 1 SP1 release. 
 
 
We appreciate your patience until then. 
 
 
Regards, 
Divakar. 
 


Loader.
Up arrow icon