ExportToCSV
Definition
Namespace:Telerik.WinControls.UI.Export
Assembly:TelerikData.dll
Syntax:
public class ExportToCSV : IExportGridTo
Inheritance: objectExportToCSV
Implements:
Constructors
Create instance of exporter class with specified RadGridView to export
public ExportToCSV(RadGridView radGridView)
RadGridView to export
Properties
Gets or sets the child view export mode.
public ChildViewExportMode ChildViewExportMode { get; set; }
The child view export mode.
Gets or sets the value that will be used for a column delimiter.
public string ColumnDelimiter { get; set; }
Gets or sets a value indicating whether values are enclosed in quotes in the exported file.
public bool EncloseDataWithQuotes { get; set; }
Gets or sets the encoding used for the exported file. Default encoding is UTF8.
public Encoding Encoding { get; set; }
Set if child rows should be exported.
public bool ExportHierarchy { get; set; }
Set file extension. Default value is csv.
public string FileExtension { get; set; }
Implements:
Set if hidden column would be exported. Note that ExportAsHidden is not relevant for CSV export.
public HiddenOption HiddenColumnOption { get; set; }
Implements:
Set if hidden rows would be exported. Note that ExportAsHidden is not relevant for CSV export.
public HiddenOption HiddenRowOption { get; set; }
Implements:
Sets a value indicating how the export behavies when paging is enabled.
public PagingExportOption PagingExportOption { get; set; }
The paging export option.
Set RadGridView that would be exported.
public RadGridView RadGridViewToExport { get; set; }
Implements:
Gets or sets the value that will be used for a row delimiter.
public string RowDelimiter { get; set; }
Set how to export summary rows.
public SummariesOption SummariesExportOption { get; set; }
Implements:
Methods
Add custom row in the provided csv table element
public void AddCustomCSVRow(TableElement csvTableElement, params string[] cellValues)
CSV table element where the new row will be added
cellValuesstring[]Values for the every csv cell object in the custom row
protected virtual void OnChildViewExporting(ChildViewExportingEventArgs e)
protected virtual void OnCSVCellFormatting(CSVCellFormattingEventArgs e)
protected virtual void OnCSVTableCreated(CSVTableCreatedEventArgs e)
Creates file in csv format.
Events
Occurs when a child view will be exported.
public event ChildViewExportingEventHandler ChildViewExporting
Fires when an csv cell was created and needs to be formatted.
public event CSVCellFormattingEventHandler CSVCellFormatting
Fires when the csv table element was created.
public event CSVTableCreatedEventHandler CSVTableCreated