Version

BeginExport Event

Occurs before the export begins.
Syntax
'Declaration
 
Public Event BeginExport As EventHandler(Of BeginExportEventArgs)
public event EventHandler<BeginExportEventArgs> BeginExport
Event Data

The event handler receives an argument of type BeginExportEventArgs containing data related to this event. The following BeginExportEventArgs properties provide information specific to this event.

PropertyDescription
Layout A cloned Infragistics.Win.UltraWinGrid.UltraGridLayout of the grid being exported.
Rows The root Infragistics.Win.UltraWinGrid.RowsCollection of the grid being exported.
Section The Infragistics.Documents.Reports.Report.Section.ISection in the report to which the grid will be exported.
Remarks

The BeginExportEventArgs.Layout is a cloned Infragistics.Win.UltraWinGrid.UltraGridLayout of the grid being exported. Since the layout is cloned, you can safely modify the layout for exporting without affecting the on-screen grid.

BeginExportEventArgs.Rows is the root Infragistics.Win.UltraWinGrid.RowsCollection of the grid being exported.

BeginExportEventArgs.Section is the the Infragistics.Documents.Reports.Report.Section.ISection in the report into which the grid will be exported. The section PageSize will automatically be set during the export process and should not be modified in this event.

This event is fired before all other events when the Export(UltraGrid,String,GridExportFileFormat) method is called. You can use it to do any preprocessing before exporting process starts. For example, you can set properties on the cloned layout.

Example
Imports Infragistics.Documents.Report
Imports Infragistics.Win.UltraWinGrid.DocumentExport
Imports Infragistics.Documents.Report.Section
Imports Infragistics.Documents.Report.Text

Private Sub ultraGridDocumentExporter1_BeginExport(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.DocumentExport.BeginExportEventArgs) Handles ultraGridDocumentExporter1.BeginExport

	' Insert some content into the report before the grid.
	Dim text As IText = e.Section.AddText()
	text.AddContent("This is some extra text inserted into the report before the grid in the same section.")

End Sub
using Infragistics.Documents.Report;
using Infragistics.Win.UltraWinGrid.DocumentExport;
using Infragistics.Documents.Report.Section;
using Infragistics.Documents.Report.Text;

private void ultraGridDocumentExporter1_BeginExport(object sender, BeginExportEventArgs e)
{
	// Insert some content into the report before the grid.
	IText text = e.Section.AddText();
	text.AddContent("This is some extra text inserted into the report before the grid in the same section.");
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also