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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid export

Thread ID:

Created:

Updated:

Platform:

Replies:

143009 Feb 28,2019 12:31 PM UTC Mar 5,2019 05:39 AM UTC ASP.NET MVC - EJ 2 3
loading
Tags: Grid
Norberto
Asked On February 28, 2019 12:31 PM UTC

Good Morning.

I'm using the grid control, it has 120 columns, I added the export buttons. When I export the file in excel, it only shows me about 10 or 11 columns.

Another problem with the control, since I have more than 100 columns and more than 3000 rows, the visibility of the data becomes somewhat slow.

Greetings and thank you

Pavithra Subramaniyam [Syncfusion]
Replied On March 1, 2019 10:21 AM UTC

Hi Norberto, 

Thanks for contacting Syncfusion support. 

Query #1: I'm using the grid control, it has 120 columns, I added the export buttons. When I export the file in excel, it only shows me about 10 or 11 columns. 

We have prepared the sample with more than 120 columns. But unfortunately the reported issue was not reproduced at our end. So we have attached the prepared sample with this update for your reference and that can be download from the below link, 

 
If you are still facing the issue could you please provide the below detaila that will be helpful for us to provide a better solution as early as possible. 
 
  1. Share your Grid code example.
  2. Share your Syncfusion package version

Query #2: Another problem with the control, since I have more than 100 columns and more than 3000 rows, the visibility of the data becomes somewhat slow. 

We suggest to enable row and column virtualization in Grid to avoid this issue while rendering the large number of rows and columns in Grid. You can enable this in Grid by using enableVirtualization and enableColumnVirtualization property of the Grid. We already have the sample demo by using this virtual scrolling feature. In that sample we have loaded 100k records to the Grid. You can find that sample demo in the below link, 


Refer the below link to know about this properties, 


 
Please contact us if you need any further assistance on this. 
 
Regards, 
Pavithra S. 


Norberto
Replied On March 3, 2019 03:49 PM UTC

Thanks for your answer.

Removing Virtualization does not show me the data but it does export all the data.
I attach the code of my project.
 
Thanks


Attachment: Resultado_e2e0afaa.zip

Pavithra Subramaniyam [Syncfusion]
Replied On March 5, 2019 05:39 AM UTC

Hi Norberto, 
 
We have analyzed the requirement. We suggest you to enable and disable the “enableColumnVirtualization” and “enableVirtualization” properties in the “ToolbarClick” and “ExcelExportComplete” events of Grid to achieve your requirement. Please refer the code example below, 
 
     
    @Html.EJS().Grid("Grid")...EnableColumnVirtualization().EnableVirtualization().Height("500").AllowExcelExport(true) 
    .Columns(col => 
    { 
        col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").Add(); 
        col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); 
        col.Field("EmployeeID").HeaderText("Customer Name").Width("150").Add(); 
        ... 
 
    }).Load("load").ExcelExportComplete("excelExportComplete").ToolbarClick("toolbarClick").Toolbar(new List<string>() { "ExcelExport" }).Render() 
 
    <script> 
        function toolbarClick(args) { 
            var gridObj = document.getElementById("Grid").ej2_instances[0]; 
            if (args.item.id === 'Grid_excelexport') { 
                //Disable virtualization before calling excel export method 
                gridObj.enableColumnVirtualization = false; 
                gridObj.enableVirtualization = false; 
                gridObj.excelExport(); 
            } 
        } 
        function excelExportComplete(args) { 
            //Enable the virtualization here 
            this.enableColumnVirtualization = true; 
            this.enableVirtualization = true; 
        } 
        ... 
    </script> 
 
 
Documentation :  
 
Please get back to us if you need further assistance. 
 
Regards, 
Pavithra S. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;