Example of Print in Blazor DataGrid Component
This sample demonstrates the DataGrid's print functionality. To print the DataGrid, click the toolbar button.
Order ID | Customer ID | Order Date | Freight | Ship Country |
---|
10001 | ALFKI | 5/15/1991 | $2.30 | Denmark |
10002 | ANATR | 4/4/1990 | $3.30 | Brazil |
10003 | ANTON | 11/30/1957 | $4.30 | Germany |
10004 | BLONP | 10/22/1930 | $5.30 | Austria |
10005 | BOLID | 2/18/1953 | $6.30 | Switzerland |
10006 | ALFKI | 5/15/1991 | $4.60 | Denmark |
10007 | ANATR | 4/4/1990 | $6.60 | Brazil |
10008 | ANTON | 11/30/1957 | $8.60 | Germany |
10009 | BLONP | 10/22/1930 | $10.60 | Austria |
10010 | BOLID | 2/18/1953 | $12.60 | Switzerland |
10011 | ALFKI | 5/15/1991 | $6.90 | Denmark |
10012 | ANATR | 4/4/1990 | $9.90 | Brazil |
The PrintAsync method can be used to print the Blazor DataGrid. If the pager and scrollbar are enabled in DataGrid, they will be removed while printing. All pages are printed by default. Alternatively, you can simply print the current page by setting the PrintMode property to CurrentPage.
More information about the Print feature can be found in this documentation section.