Class
ExportToCSV

Definition

Namespace:Telerik.WinControls.UI.Export

Assembly:TelerikData.dll

Syntax:

cs-api-definition
public class ExportToCSV : IExportGridTo

Inheritance: objectExportToCSV

Implements: IExportGridTo

Constructors

ExportToCSV(RadGridView)

Create instance of exporter class with specified RadGridView to export

Declaration

cs-api-definition
public ExportToCSV(RadGridView radGridView)

Parameters

radGridView

RadGridView

RadGridView to export

Properties

ChildViewExportMode

Gets or sets the child view export mode.

Declaration

cs-api-definition
public ChildViewExportMode ChildViewExportMode { get; set; }

Property Value

ChildViewExportMode

The child view export mode.

ColumnDelimiter

Gets or sets the value that will be used for a column delimiter.

Declaration

cs-api-definition
public string ColumnDelimiter { get; set; }

Property Value

string

EncloseDataWithQuotes

Gets or sets a value indicating whether values are enclosed in quotes in the exported file.

Declaration

cs-api-definition
public bool EncloseDataWithQuotes { get; set; }

Property Value

bool

Encoding

Gets or sets the encoding used for the exported file. Default encoding is UTF8.

Declaration

cs-api-definition
public Encoding Encoding { get; set; }

Property Value

Encoding

ExportHierarchy

Set if child rows should be exported.

Declaration

cs-api-definition
public bool ExportHierarchy { get; set; }

Property Value

bool

FileExtension

Set file extension. Default value is csv.

Declaration

cs-api-definition
public string FileExtension { get; set; }

Property Value

string

Implements IExportGridTo.FileExtension

HiddenColumnOption

Set if hidden column would be exported. Note that ExportAsHidden is not relevant for CSV export.

Declaration

cs-api-definition
public HiddenOption HiddenColumnOption { get; set; }

Property Value

HiddenOption

Implements IExportGridTo.HiddenColumnOption

HiddenRowOption

Set if hidden rows would be exported. Note that ExportAsHidden is not relevant for CSV export.

Declaration

cs-api-definition
public HiddenOption HiddenRowOption { get; set; }

Property Value

HiddenOption

Implements IExportGridTo.HiddenRowOption

PagingExportOption

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

Declaration

cs-api-definition
public PagingExportOption PagingExportOption { get; set; }

Property Value

PagingExportOption

The paging export option.

RadGridViewToExport

Set RadGridView that would be exported.

Declaration

cs-api-definition
public RadGridView RadGridViewToExport { get; set; }

Property Value

RadGridView

Implements IExportGridTo.RadGridViewToExport

RowDelimiter

Gets or sets the value that will be used for a row delimiter.

Declaration

cs-api-definition
public string RowDelimiter { get; set; }

Property Value

string

SummariesExportOption

Set how to export summary rows.

Declaration

cs-api-definition
public SummariesOption SummariesExportOption { get; set; }

Property Value

SummariesOption

Implements IExportGridTo.SummariesExportOption

Methods

AddCustomCSVRow(TableElement, params string[])

Add custom row in the provided csv table element

Declaration

cs-api-definition
public void AddCustomCSVRow(TableElement csvTableElement, params string[] cellValues)

Parameters

csvTableElement

TableElement

CSV table element where the new row will be added

cellValues

string[]

Values for the every csv cell object in the custom row

OnCSVCellFormatting(CSVCellFormattingEventArgs)

Declaration

cs-api-definition
protected virtual void OnCSVCellFormatting(CSVCellFormattingEventArgs e)

Parameters

e

CSVCellFormattingEventArgs

OnCSVTableCreated(CSVTableCreatedEventArgs)

Declaration

cs-api-definition
protected virtual void OnCSVTableCreated(CSVTableCreatedEventArgs e)

Parameters

e

CSVTableCreatedEventArgs

OnChildViewExporting(ChildViewExportingEventArgs)

Declaration

cs-api-definition
protected virtual void OnChildViewExporting(ChildViewExportingEventArgs e)

Parameters

e

ChildViewExportingEventArgs

RunExport(string)

Creates file in csv format.

Declaration

cs-api-definition
public void RunExport(string fileName)

Parameters

fileName

string

Export file name

Implements IExportGridTo.RunExport(string)

Events

CSVCellFormatting

Fires when an csv cell was created and needs to be formatted.

Declaration

cs-api-definition
public event CSVCellFormattingEventHandler CSVCellFormatting

Event Value

CSVCellFormattingEventHandler

CSVTableCreated

Fires when the csv table element was created.

Declaration

cs-api-definition
public event CSVTableCreatedEventHandler CSVTableCreated

Event Value

CSVTableCreatedEventHandler

ChildViewExporting

Occurs when a child view will be exported.

Declaration

cs-api-definition
public event ChildViewExportingEventHandler ChildViewExporting

Event Value

ChildViewExportingEventHandler