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

Pdf Export throw error when the Command Column is hidden via column chooser

Working with Syncfusion v20.4.0.48

I have a grid with a "Pdf Export" button, "Excel Export" button , "ColumnChooser" button, etc.. and one of the column is

<GridColumn Field="GridAction" HeaderText="Actions" AllowResizing="false" Width="125" MinWidth="100" MaxWidth="125">


        <GridCommandColumn Type="CommandButtonType.Edit" ButtonOption="@(new CommandButtonOptions() { IconCss = "e-icons e-edit", CssClass = "" })"></GridCommandColumn>

        <GridCommandColumn Type="CommandButtonType.Save" ButtonOption="@(new CommandButtonOptions() { IconCss = "e-icons e-save", CssClass = "e-flat" })"></GridCommandColumn>

        <GridCommandColumn Type="CommandButtonType.Cancel" ButtonOption="@(new CommandButtonOptions() { IconCss = "e-icons e-cancel-icon", CssClass = "e-flat" })"></GridCommandColumn>



"Pdf Export" button work as expected always the "Action" column is visible. Whe I choose to hide the "Action" column via "ColumnChooser" button and then click on "Pdf Export" button I get the fallowing error.

Error: Index was outside the bounds of the array.

at Syncfusion.PdfExport.PdfGridCellCollection.CheckIndex(Int32 index)
at Syncfusion.Blazor.Grids.Internal.GridPdfExport`1.ProcessColumnHeader(GridColumn column)
at Syncfusion.Blazor.Grids.Internal.GridPdfExport`1.ProcessHeaderContent()
at Syncfusion.Blazor.Grids.Internal.GridPdfExport`1.IterateElements()
at Syncfusion.Blazor.Grids.Internal.GridPdfExport`1.ExportHandler()
at Syncfusion.Blazor.Grids.Internal.GridPdfExport`1.ExecuteResult(SfGrid`1 GridModel, Object dataSource)
at Syncfusion.Blazor.Grids.Internal.GridPdfExport`1.PdfExportHelper(SfGrid`1 GridModel, Object dataSource)
at Syncfusion.Blazor.Grids.Internal.GridPdfExport`1.PdfExport(SfGrid`1 GridModel, PdfExportProperties CustomPdfProperties, Boolean multipleExport)
at Syncfusion.Blazor.Grids.SfGrid`1.ExportToPdfAsync(PdfExportProperties pdfExportProperties, Nullable`1 isMultipleExport, Object pdfDoc, Nullable`1 isBlob)
at PADM.Client.Pages.SurfacerWorkItems.ToolbarClick(ClickEventArgs args)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Syncfusion.Blazor.Grids.Internal.GridToolbar`1.ToolbarClickHandler(ClickEventArgs args)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Syncfusion.Blazor.Navigations.SfToolbar.TriggerClickEvent(MouseEventArgs e, Nullable`1 trgParentDataIndex, ItemModel clickedItem)
at Syncfusion.Blazor.Navigations.Internal.ToolbarContent.OnItemClick(MouseEventArgs e)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Just happen with the "Pdf Export" button, "Excel Export" button work fine in both case "Action" column visible or hidden.

2 Replies

NP Naveen Palanivel Syncfusion Team February 7, 2023 04:29 PM UTC

Hi Javier,

We have confirmed this as an issue and logged the defect report “Pdf Export throw error when the Command Column is hidden via column chooser for the same. Thank you for taking time to report this issue and helping us to improve our product. At Syncfusion, we are committed to fix all validated defects (subject to technological feasibility and Product Development Life Cycle) and this fix will be included in our upcoming patch release which is expected to be rolled out on or before 28th    Feb, 2023.

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.       


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”


Naveen Palanivel

NP Naveen Palanivel Syncfusion Team March 3, 2023 02:23 AM UTC

Hi Javier,

We are glad to announce that, we have included the fix for the issue “Pdf Export throw error when the Command Column is hidden via column chooser” in our release (  So please upgrade to our latest version of Syncfusion NuGet package to resolve the reported issue. Please find the Nuget package for latest fixes and features from below.

Nuget : https://www.nuget.org/packages/Syncfusion.Blazor.Grid

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 

Please let us know if you have any concerns.



Live Chat Icon For mobile
Up arrow icon