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

Represents a grid export that utilizes the RadSpreadStreamProcessing library.

Definition

Namespace:Telerik.WinControls.Export

Assembly:Telerik.WinControls.GridView.dll

Syntax:

C#
public class GridViewSpreadStreamExport

Inheritance: objectGridViewSpreadStreamExport

Constructors

Initializes a new instance of the GridViewSpreadExport class.

C#
public GridViewSpreadStreamExport(RadGridView radGridView, SpreadStreamExportFormat spreadExportFormat)
Parameters:radGridViewRadGridView

The grid to export.

spreadExportFormatSpreadStreamExportFormat

The spread export format.

Initializes a new instance of the GridViewSpreadExport class.

C#
public GridViewSpreadStreamExport(RadGridView radGridView)
Parameters:radGridViewRadGridView

The grid to export.

Properties

Gets or sets the child view export mode.

C#
public ChildViewExportMode ChildViewExportMode { get; set; }
Property Value:

The child view export mode.

Gets or sets a value indicating whether to export hierarchy and group child rows grouped.

C#
public bool ExportChildRowsGrouped { get; set; }

Gets or sets the format of the exported file - XLSX or CSV.

C#
public SpreadStreamExportFormat ExportFormat { get; set; }
Property Value:

The file extension.

Gets or sets a value indicating whether to export grouped columns.

C#
public bool ExportGroupedColumns { get; set; }

Gets or set if child rows should be exported.

C#
public bool ExportHierarchy { get; set; }

Gets or sets a value indicating whether to export view definition. Note that if using

RunExportAsync
method to export, the view definition will not be exported.

C#
public bool ExportViewDefinition { get; set; }

Gets or sets a value indicating whether the visual settings should be exported.

C#
public bool ExportVisualSettings { get; set; }
Property Value:

true if visual settings are exported; otherwise, false.

Specifies whether a file will be exported as a new file, or if a file with the same name already exists at the specified path, a new sheet will be added to it.

C#
public FileExportMode FileExportMode { get; set; }
Property Value:

ExportAsNewSheetInExistingFile - will add a new sheet to the specified file, if it exists ExportInNewFile - will create/override the specified file

Gets or sets a value indicating whether to freeze the header row in the exported file.

C#
public bool FreezeHeaderRow { get; set; }

Gets or sets a value indicating whether to freeze pinned columns.

C#
public bool FreezePinnedColumns { get; set; }

Gets or sets a value indicating whether to freeze pinned rows.

C#
public bool FreezePinnedRows { get; set; }

Gets or sets a value indicating how hidden columns are exported.

C#
public HiddenOption HiddenColumnOption { get; set; }
Property Value:

The hidden column option.

Gets or sets a value indicating how hidden rows are exported.

C#
public HiddenOption HiddenRowOption { get; set; }
Property Value:

The hidden row option.

Gets or sets a value indicating how the export behaves when paging is enabled.

C#
public PagingExportOption PagingExportOption { get; set; }
Property Value:

The paging export option.

Gets or sets the RadGridView to export.

C#
public RadGridView RadGridViewToExport { get; set; }
Property Value:

The RadGridView to export.

Gets or sets the maximum number of rows per sheet.

C#
[CLSCompliant(false)]
public ExcelMaxRows SheetMaxRows { get; set; }
Property Value:

The sheet max rows.

Gets or sets the name of the sheet.

C#
public string SheetName { get; set; }
Property Value:

The name of the sheet.

Gets or sets a value indicating how summary rows are exported.

C#
public SummariesOption SummariesExportOption { get; set; }
Property Value:

The summaries export option.

Methods

Cancels an asynchronous export operation.

C#
public void CancelExportAsync()

Raises the event.

C#
protected virtual void OnAsyncExportCompleted(AsyncCompletedEventArgs e)
Parameters:eAsyncCompletedEventArgs

The AsyncCompletedEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnAsyncExportProgressChanged(ProgressChangedEventArgs e)
Parameters:eProgressChangedEventArgs

The ProgressChangedEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnCellFormatting(SpreadStreamCellFormattingEventArgs e)
Parameters:eSpreadStreamCellFormattingEventArgs

The SpreadStreamCellFormattingEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnChildViewExporting(ChildViewExportingEventArgs e)
Parameters:eChildViewExportingEventArgs

The ChildViewExportingEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnExportCompleted(EventArgs e)
Parameters:eEventArgs

The EventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnRowCreated(SpreadStreamRowEventArgs e)
Parameters:eSpreadStreamRowEventArgs

The SpreadStreamRowEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnRowExporting(SpreadStreamRowEventArgs e)
Parameters:eSpreadStreamRowEventArgs

The SpreadStreamRowEventArgs instance containing the event data.

Starts an export operation, in the specified sheet. If such sheet does not exist, it gets created.

C#
public void RunExport(Stream exportStream, ISpreadStreamExportRenderer exportRenderer, string sheetName)
Parameters:exportStreamStream

The stream where data will be exported.

exportRendererISpreadStreamExportRenderer

Instance of ISpreadStreamExportRenderer class.

sheetNamestring

Name of the sheet.

Starts an export operation.

C#
public void RunExport(Stream exportStream, ISpreadStreamExportRenderer exportRenderer)
Parameters:exportStreamStream

The stream where data will be exported.

exportRendererISpreadStreamExportRenderer

Instance of ISpreadStreamExportRenderer class.

Starts an export operation, in the specified sheet. If such sheet does not exist, it gets created.

C#
public void RunExport(string fileName, ISpreadStreamExportRenderer exportRenderer, string sheetName)
Parameters:fileNamestring

The file name where data will be exported.

exportRendererISpreadStreamExportRenderer

Instance of ISpreadStreamExportRenderer class.

sheetNamestring

Name of the sheet.

Starts an export operation.

C#
public void RunExport(string fileName, ISpreadStreamExportRenderer exportRenderer)
Parameters:fileNamestring

The file name where data will be exported.

exportRendererISpreadStreamExportRenderer

Instance of ISpreadStreamExportRenderer class.

Starts an async export operation, in the specified sheet. If such sheet does not exist, it gets created.

C#
public void RunExportAsync(Stream exportStream, ISpreadStreamExportRenderer exportRenderer, string sheetName)
Parameters:exportStreamStream

The stream where data will be exported.

exportRendererISpreadStreamExportRenderer

Instance of ISpreadStreamExportRenderer class.

sheetNamestring

Name of the sheet.

Starts an export operation that runs in a background thread.

C#
public void RunExportAsync(Stream exportStream, ISpreadStreamExportRenderer exportRenderer)
Parameters:exportStreamStream

The stream where data will be exported.

exportRendererISpreadStreamExportRenderer

Instance of ISpreadStreamExportRenderer class.

Starts an async export operation, in the specified sheet. If such sheet does not exist, it gets created.

C#
public void RunExportAsync(string fileName, ISpreadStreamExportRenderer exportRenderer, string sheetName)
Parameters:fileNamestring

The file name where data will be exported.

exportRendererISpreadStreamExportRenderer

Instance of ISpreadStreamExportRenderer class.

sheetNamestring

Name of the sheet.

Starts an export operation that runs in a background thread.

C#
public void RunExportAsync(string fileName, ISpreadStreamExportRenderer exportRenderer)
Parameters:fileNamestring

The file name where data will be exported.

exportRendererISpreadStreamExportRenderer

Instance of ISpreadStreamExportRenderer class.

Events

Occurs when an async export operation is completed.

C#
public event AsyncCompletedEventHandler AsyncExportCompleted

Occurs when the progress of an async export operation changes.

C#
public event ProgressChangedEventHandler AsyncExportProgressChanged

Occurs for every cell that is being exported.

C#
public event SpreadStreamCellFormattingEventHandler CellFormatting

Occurs when a child view will be exported.

C#
public event ChildViewExportingEventHandler ChildViewExporting

Occurs when the export process completes.

C#
public event EventHandler ExportCompleted

Occurs when a new row is created in current worksheet. This is suitable place to set any row properties(like height) and/or add any indent cells.

C#
public event SpreadStreamRowEventHandler RowCreated

Occurs when a spread row is about to be exported. This is suitable place to add any additional cells at the end of the row.

C#
public event SpreadStreamRowEventHandler RowExporting