New to Telerik UI for Blazor? Start a free 30-day trial

Define the Exported Grid Columns

Updated on Oct 19, 2026

Environment

ProductGrid for Blazor
Version15.0.1 and above

Description

Define exactly which data fields the Telerik Grid exports to an Excel file.

Solution

Clear the args.Columns collection in the OnBeforeExport event handler and add one GridExcelExportColumn for each field. The Field property must match a property in the Grid data item.

Define the exported Grid columns

Example
View Source
<TelerikGrid Data="@Products">
    <GridToolBar>
        <GridToolBarExcelExportTool>Export to Excel</GridToolBarExcelExportTool>
    </GridToolBar>
    <GridSettings>
        <GridExcelExport OnBeforeExport="@OnBeforeExcelExport" />
    </GridSettings>
    <GridColumns>
        <GridColumn Field="@nameof(Product.Name)" />
        <GridColumn Field="@nameof(Product.Price)" />
    </GridColumns>
</TelerikGrid>

@code {
    private List<Product> Products { get; set; } = new()
    {
        new Product { Name = "Product 1", Price = 12.50m },
        new Product { Name = "Product 2", Price = 24.00m }
    };

    private void OnBeforeExcelExport(GridBeforeExcelExportEventArgs args)
    {
        args.Columns.Clear();
        args.Columns.Add(new GridExcelExportColumn
        {
            Field = nameof(Product.Name),
            Title = "Product",
            Width = "180px"
        });
        args.Columns.Add(new GridExcelExportColumn
        {
            Field = nameof(Product.Price),
            Title = "Price",
            NumberFormat = "$#,##0.00"
        });
    }

    public class Product
    {
        public string Name { get; set; }
        public decimal Price { get; set; }
    }
}

See Also