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

Definition

Namespace:Telerik.WinControls.UI.Export

Assembly:TelerikData.dll

Syntax:

C#
public class ExportToExcelML : IExportGridTo

Inheritance: objectExportToExcelML

Implements: IExportGridTo

Constructors

C#
public ExportToExcelML(RadGridView radGridView)
Parameters:radGridViewRadGridView

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 the encoding used for the exported file. Default encoding is UTF8.

C#
public Encoding Encoding { get; set; }

Set if child rows should be exported.

C#
public bool ExportHierarchy { set; }

Sets a value indicating whether the visual settings should be exported.

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

true if visual settings are exported; otherwise, false.

Sets the file extension of the exported file.

C#
public string FileExtension { set; }
Property Value:

The file extension.

Implements: IExportGridTo.FileExtension

Sets a value indicating how hidden columns are exported.

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

The hidden column option.

Implements: IExportGridTo.HiddenColumnOption

Sets a value indicating how hidden rows are exported.

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

The hidden row option.

Implements: IExportGridTo.HiddenRowOption

Sets a value indicating how the export behavies when paging is enabled.

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

The paging export option.

Sets the RadGridView to export.

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

The RadGridView to export.

Implements: IExportGridTo.RadGridViewToExport

Sets the sheet max rows.

C#
public ExcelMaxRows SheetMaxRows { set; }
Property Value:

The sheet max rows.

Sets the name of the sheet.

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

The name of the sheet.

Sets a value indicating how summary rows are exported.

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

The summaries export option.

Implements: IExportGridTo.SummariesExportOption

Methods

Add custom row in the provided excel table element

C#
public SingleStyleElement AddCustomExcelRow(TableElement excelTableElement, int rowHeight, params object[] cellValues)
Parameters:excelTableElementTableElement

Excel table element where the new row will be added

rowHeightint

Custom row height in pixels. If 0 than the height has default value

cellValuesobject[]

Values for the every excel cell in the custom row

Returns:

SingleStyleElement

New row's style element for further formatting

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 OnExcelCellFormatting(ExcelCellFormattingEventArgs e)
Parameters:eExcelCellFormattingEventArgs

The ExcelCellFormattingEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnExcelCellFormatting(ExcelRowFormattingEventArgs e)
Parameters:eExcelRowFormattingEventArgs

The ExcelRowFormattingEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnExcelTableCreated(ExcelTableCreatedEventArgs e)
Parameters:eExcelTableCreatedEventArgs

The ExcelTableCreatedEventArgs instance containing the event data.

Creates ExcelML file

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

Export file name

Implements: IExportGridTo.RunExport(string)

Events

Occurs when a child view will be exported.

C#
public event ChildViewExportingEventHandler ChildViewExporting

Occurs for every cell that is being exported.

C#
public event ExcelCellFormattingEventHandler ExcelCellFormatting

Occurs for every row that is being exported.

C#
public event ExcelRowFormattingEventHandler ExcelRowFormatting

Occurs when the excel table is created.

C#
public event ExcelTableCreatedEventHandler ExcelTableCreated