skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class ExportToCSV

Inheritance
System.Object
ExportToCSV
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.UI.Export
Assembly: TelerikData.dll

Syntax

public class ExportToCSV : IExportGridTo

Constructors

ExportToCSV(RadGridView)

Create instance of exporter class with specified RadGridView to export

Declaration
public ExportToCSV(RadGridView radGridView)
Parameters
RadGridView radGridView

RadGridView to export

Properties

ChildViewExportMode

Gets or sets the child view export mode.

Declaration
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
public string ColumnDelimiter { get; set; }
Property Value
System.String

EncloseDataWithQuotes

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

Declaration
public bool EncloseDataWithQuotes { get; set; }
Property Value
System.Boolean

Encoding

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

Declaration
public Encoding Encoding { get; set; }
Property Value
System.Text.Encoding

ExportHierarchy

Set if child rows should be exported.

Declaration
public bool ExportHierarchy { get; set; }
Property Value
System.Boolean

FileExtension

Set file extension. Default value is csv.

Declaration
public string FileExtension { get; set; }
Property Value
System.String

Implements
IExportGridTo.FileExtension

HiddenColumnOption

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

Declaration
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
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
public PagingExportOption PagingExportOption { get; set; }
Property Value
PagingExportOption

The paging export option.

RadGridViewToExport

Set RadGridView that would be exported.

Declaration
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
public string RowDelimiter { get; set; }
Property Value
System.String

SummariesExportOption

Set how to export summary rows.

Declaration
public SummariesOption SummariesExportOption { get; set; }
Property Value
SummariesOption

Implements
IExportGridTo.SummariesExportOption

Methods

AddCustomCSVRow(TableElement, String[])

Add custom row in the provided csv table element

Declaration
public void AddCustomCSVRow(TableElement csvTableElement, params string[] cellValues)
Parameters
TableElement csvTableElement

CSV table element where the new row will be added

System.String[] cellValues

Values for the every csv cell object in the custom row

OnChildViewExporting(ChildViewExportingEventArgs)

Declaration
protected virtual void OnChildViewExporting(ChildViewExportingEventArgs e)
Parameters
ChildViewExportingEventArgs e

OnCSVCellFormatting(CSVCellFormattingEventArgs)

Declaration
protected virtual void OnCSVCellFormatting(CSVCellFormattingEventArgs e)
Parameters
CSVCellFormattingEventArgs e

OnCSVTableCreated(CSVTableCreatedEventArgs)

Declaration
protected virtual void OnCSVTableCreated(CSVTableCreatedEventArgs e)
Parameters
CSVTableCreatedEventArgs e

RunExport(String)

Creates file in csv format.

Declaration
public void RunExport(string fileName)
Parameters
System.String fileName

Export file name

Implements
IExportGridTo.RunExport(String)

Events

ChildViewExporting

Occurs when a child view will be exported.

Declaration
public event ChildViewExportingEventHandler ChildViewExporting
Event Type
ChildViewExportingEventHandler

CSVCellFormatting

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

Declaration
public event CSVCellFormattingEventHandler CSVCellFormatting
Event Type
CSVCellFormattingEventHandler

CSVTableCreated

Fires when the csv table element was created.

Declaration
public event CSVTableCreatedEventHandler CSVTableCreated
Event Type
CSVTableCreatedEventHandler

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.