Export with external button not working

Hi,

with version 18.1.0.36 the export by external button is not working (blazor server). I copied your example and i get an error (screen attached).



@using Syncfusion.Blazor.Buttons
@using Syncfusion.Blazor.Grids

<SfButton OnClick="ExcelExport" Content="Excel Export"></SfButton>
<SfGrid @ref="DefaultGrid" DataSource="@Orders" AllowExcelExport="true" AllowPaging="true">
    <GridColumns>
        <GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" TextAlign="TextAlign.Right" Width="120"></GridColumn>
        <GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer Name" Width="150"></GridColumn>
        <GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" Width="130"></GridColumn>
        <GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" Format="C2" TextAlign="TextAlign.Right" Width="120"></GridColumn>
    </GridColumns>
</SfGrid>

@code{
    private SfGrid<Order> DefaultGrid;

    public List<Order> Orders { get; set; }

    protected override void OnInitialized()
    {
        Orders = Enumerable.Range(1, 15).Select(x => new Order()
        {
            OrderID = 1000 + x,
            CustomerID = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
            Freight = 2.1 * x,
            OrderDate = DateTime.Now.AddDays(-x),
        }).ToList();
    }

    public class Order
    {
        public int? OrderID { get; set; }
        public string CustomerID { get; set; }
        public DateTime? OrderDate { get; set; }
        public double? Freight { get; set; }
    }

    public void ExcelExport()
    {
        ExcelExportProperties ExcelProperties = new ExcelExportProperties();
        ExcelProperties.DataSource = Orders;
        this.DefaultGrid.ExcelExport(ExcelProperties);
    }
}

4 Replies

UN Unknown March 26, 2020 07:22 AM UTC

Nobody else has this problem right now?


RN Rahul Narayanasamy Syncfusion Team March 26, 2020 03:47 PM UTC

Hi Nils, 

Greetings from Syncfusion. 

Query: Export with external button not working  

We have validated your query and we are able to reproduce the reported problem at our end. We have considered it as a bug and logged defect report for the same Exporting is not working while export using external buttons. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming Volume 1 main release which is expected to be rolled on or before first week of April 2020.  
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  
 
  
Till then we appreciate your patience.   

Regards, 
Rahul 



EL Ernesto Leyva August 13, 2020 07:43 PM UTC

Hi Nils,
Yes I'm also experiencing this issue.

Thanks


RN Rahul Narayanasamy Syncfusion Team August 14, 2020 06:19 AM UTC

Hi Ernesto, 

Greetings from Syncfusion. 

We have validated your query and we would like to inform that the reported problem was included in our release version 18.1.0.42. In this release, we have fixed the issue “Exporting is not working while export using external buttons”.  

Also we have checked the reported problem in the latest mentioned version(18.2.0.48). It works fine at our end. The exporting operations are working fine at our end. Find the below sample for your reference. 


If you are still facing the problem, could you please reproduce the problem in the provided sample and revert back to us. It will be helpful to validate and provide a better solution. 

Regards, 
Rahul 


Loader.
Up arrow icon