Class PrintingEventArgs
Provides information about the Printing event.
Inherited Members
Namespace: Syncfusion.Blazor.Grids
Assembly: Syncfusion.Blazor.Grids.dll
Syntax
public class PrintingEventArgs : GridEventBaseArgs
Remarks
This class contains settings used to customize the Grid print operation. You can cancel printing, specify an alternative data source for the printed output, and define custom header and footer content.
Constructors
PrintingEventArgs()
Declaration
public PrintingEventArgs()
Properties
Cancel
Gets or sets a value indicating whether the print operation should be cancelled.
Declaration
public bool Cancel { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating whether printing is cancelled. Set to true to cancel the print operation; otherwise, false. The default value is false. |
FooterTemplate
Gets or sets the template that defines the footer content displayed in the printed document.
Declaration
public RenderFragment? FooterTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment | A RenderFragment that represents the footer content of the printed document. The default value is null. |
Remarks
Use this property to display custom content such as page information, disclaimers, images, or summary details.
The template is rendered only in the printed output and does not affect the Grid displayed in the application.
HeaderTemplate
Gets or sets the template that defines the header content displayed in the printed document.
Declaration
public RenderFragment? HeaderTemplate { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderFragment | A RenderFragment that represents the header content of the printed document. The default value is null. |
Remarks
Use this property to display custom content such as report titles, images, company information, or other introductory content.
The template is rendered only in the printed output and does not affect the Grid displayed in the application.
PrintDataSource
Gets or sets the data source used to generate the printed output.
Declaration
public IEnumerable<object>? PrintDataSource { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<object> | An IEnumerable<T> containing the records to include in the printed document. The default value is null. |
Remarks
When a value is assigned, the Grid prints the specified records instead of using its current data source.
When the value is null, the Grid uses its current data source and state to generate the printed output.