Skip to content

About

In many applications, you may need to export data from a grid (like a data grid or table in a web application) into a downloadable file format, such as PDF. This can be particularly useful for generating reports or saving data for offline use. One way to achieve this is by using a memory stream

Topics

Resources

Stars

0 stars

Watchers

3 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Blazor DataGrid Export Memory Stream

A production-ready sample demonstrating how to export Blazor DataGrid data as memory streams for PDF generation and advanced data handling. This project showcases both basic memory stream export and advanced scenarios like merging multiple PDFs.

Overview

This repository contains a complete Blazor application that demonstrates efficient data export patterns using the DataGrid component. Instead of writing directly to disk, the application exports grid data to in-memory streams, enabling flexible post-processing, dynamic content generation, and optimized performance for web-based scenarios.

Features

  • Basic PDF Export: Export grid data directly as a PDF memory stream
  • Advanced PDF Merging: Combine multiple grid exports with custom styling into a single PDF
  • Custom Theme Support: Apply custom colors, fonts, and borders to exported PDFs
  • Server-Side & Client-Side Rendering: Leverages Blazor's interactive capabilities
  • Toolbar Integration: Export functionality integrated into the DataGrid toolbar
  • Client-Side File Download: Seamless download experience using JavaScript interop

Prerequisites

Getting Started

Clone the repository

git clone https://github.com/SyncfusionExamples/blazor-datagrid-export-memory-stream.git
cd blazor-datagrid-export-memory-stream/GridPDFStream

Run with Visual Studio

  1. Open the solution file using Visual Studio 2022 or later.
  2. Restore the NuGet packages by rebuilding the solution.
  3. Build the project to ensure there are no compilation errors.
  4. Run the project.

Run with .NET CLI

# Restore dependencies
dotnet restore

# Run the project
dotnet run

References

About

In many applications, you may need to export data from a grid (like a data grid or table in a web application) into a downloadable file format, such as PDF. This can be particularly useful for generating reports or saving data for offline use. One way to achieve this is by using a memory stream

Topics

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages