Represents a grid export that utilizes the RadSpreadStreamProcessing library.
Definition
Namespace:Telerik.WinControls.Export
Assembly:Telerik.WinControls.GridView.dll
Syntax:
public class GridViewSpreadStreamExport
Inheritance: objectGridViewSpreadStreamExport
Constructors
Initializes a new instance of the GridViewSpreadExport class.
public GridViewSpreadStreamExport(RadGridView radGridView, SpreadStreamExportFormat spreadExportFormat)
The grid to export.
spreadExportFormatSpreadStreamExportFormatThe spread export format.
Initializes a new instance of the GridViewSpreadExport class.
public GridViewSpreadStreamExport(RadGridView radGridView)
The grid to export.
Properties
Gets or sets the child view export mode.
public ChildViewExportMode ChildViewExportMode { get; set; }
The child view export mode.
Gets or sets a value indicating whether to export hierarchy and group child rows grouped.
public bool ExportChildRowsGrouped { get; set; }
Gets or sets the format of the exported file - XLSX or CSV.
public SpreadStreamExportFormat ExportFormat { get; set; }
The file extension.
Gets or sets a value indicating whether to export grouped columns.
public bool ExportGroupedColumns { get; set; }
Gets or set if child rows should be exported.
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.public bool ExportViewDefinition { get; set; }
Gets or sets a value indicating whether the visual settings should be exported.
public bool ExportVisualSettings { get; set; }
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.
public FileExportMode FileExportMode { get; set; }
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.
public bool FreezeHeaderRow { get; set; }
Gets or sets a value indicating whether to freeze pinned columns.
public bool FreezePinnedColumns { get; set; }
Gets or sets a value indicating whether to freeze pinned rows.
public bool FreezePinnedRows { get; set; }
Gets or sets a value indicating how hidden columns are exported.
public HiddenOption HiddenColumnOption { get; set; }
The hidden column option.
Gets or sets a value indicating how hidden rows are exported.
public HiddenOption HiddenRowOption { get; set; }
The hidden row option.
Gets or sets a value indicating how the export behaves when paging is enabled.
public PagingExportOption PagingExportOption { get; set; }
The paging export option.
Gets or sets the RadGridView to export.
public RadGridView RadGridViewToExport { get; set; }
The RadGridView to export.
Gets or sets the maximum number of rows per sheet.
[CLSCompliant(false)]
public ExcelMaxRows SheetMaxRows { get; set; }
The sheet max rows.
Gets or sets the name of the sheet.
public string SheetName { get; set; }
The name of the sheet.
Gets or sets a value indicating how summary rows are exported.
public SummariesOption SummariesExportOption { get; set; }
The summaries export option.
Methods
Cancels an asynchronous export operation.
public void CancelExportAsync()
Raises the event.
protected virtual void OnAsyncExportCompleted(AsyncCompletedEventArgs e)
The AsyncCompletedEventArgs instance containing the event data.
Raises the event.
protected virtual void OnAsyncExportProgressChanged(ProgressChangedEventArgs e)
The ProgressChangedEventArgs instance containing the event data.
Raises the event.
protected virtual void OnCellFormatting(SpreadStreamCellFormattingEventArgs e)
The SpreadStreamCellFormattingEventArgs instance containing the event data.
Raises the event.
protected virtual void OnChildViewExporting(ChildViewExportingEventArgs e)
The ChildViewExportingEventArgs instance containing the event data.
Raises the event.
protected virtual void OnRowCreated(SpreadStreamRowEventArgs e)
The SpreadStreamRowEventArgs instance containing the event data.
Raises the event.
protected virtual void OnRowExporting(SpreadStreamRowEventArgs e)
The SpreadStreamRowEventArgs instance containing the event data.
Starts an export operation, in the specified sheet. If such sheet does not exist, it gets created.
public void RunExport(Stream exportStream, ISpreadStreamExportRenderer exportRenderer, string sheetName)
The stream where data will be exported.
exportRendererISpreadStreamExportRendererInstance of ISpreadStreamExportRenderer class.
sheetNamestringName of the sheet.
Starts an export operation.
public void RunExport(Stream exportStream, ISpreadStreamExportRenderer exportRenderer)
The stream where data will be exported.
exportRendererISpreadStreamExportRendererInstance of ISpreadStreamExportRenderer class.
Starts an export operation, in the specified sheet. If such sheet does not exist, it gets created.
public void RunExport(string fileName, ISpreadStreamExportRenderer exportRenderer, string sheetName)
The file name where data will be exported.
exportRendererISpreadStreamExportRendererInstance of ISpreadStreamExportRenderer class.
sheetNamestringName of the sheet.
Starts an export operation.
public void RunExport(string fileName, ISpreadStreamExportRenderer exportRenderer)
The file name where data will be exported.
exportRendererISpreadStreamExportRendererInstance of ISpreadStreamExportRenderer class.
Starts an async export operation, in the specified sheet. If such sheet does not exist, it gets created.
public void RunExportAsync(Stream exportStream, ISpreadStreamExportRenderer exportRenderer, string sheetName)
The stream where data will be exported.
exportRendererISpreadStreamExportRendererInstance of ISpreadStreamExportRenderer class.
sheetNamestringName of the sheet.
Starts an export operation that runs in a background thread.
public void RunExportAsync(Stream exportStream, ISpreadStreamExportRenderer exportRenderer)
The stream where data will be exported.
exportRendererISpreadStreamExportRendererInstance of ISpreadStreamExportRenderer class.
Starts an async export operation, in the specified sheet. If such sheet does not exist, it gets created.
public void RunExportAsync(string fileName, ISpreadStreamExportRenderer exportRenderer, string sheetName)
The file name where data will be exported.
exportRendererISpreadStreamExportRendererInstance of ISpreadStreamExportRenderer class.
sheetNamestringName of the sheet.
Starts an export operation that runs in a background thread.
public void RunExportAsync(string fileName, ISpreadStreamExportRenderer exportRenderer)
The file name where data will be exported.
exportRendererISpreadStreamExportRendererInstance of ISpreadStreamExportRenderer class.
Events
Occurs when an async export operation is completed.
public event AsyncCompletedEventHandler AsyncExportCompleted
Occurs when the progress of an async export operation changes.
public event ProgressChangedEventHandler AsyncExportProgressChanged
Occurs for every cell that is being exported.
public event SpreadStreamCellFormattingEventHandler CellFormatting
Occurs when a child view will be exported.
public event ChildViewExportingEventHandler ChildViewExporting
Occurs when the export process completes.
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.
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.
public event SpreadStreamRowEventHandler RowExporting