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.
Unfortunately, activation email could not send to your email. Please try again.

Export to excel paged SfDataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

128661 Feb 3,2017 07:00 AM Feb 6,2017 07:37 AM Xamarin.Android 1
loading
Tags: SfDataGrid
stanicb
Asked On February 3, 2017 07:00 AM

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);

Divakar Subramaniam [Syncfusion]
Replied On February 6, 2017 07:37 AM

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. 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;