New to Telerik ReportingStart a free 30-day trial

Represents a data model, based on a textual Comma-Separated-Values data.

Definition

Namespace:Telerik.Reporting

Assembly:Telerik.Reporting.dll

Syntax:

C#
public class CsvDataSource : DataSource, IDataSource

Inheritance: objectMarshalByRefObjectComponentDataSourceCsvDataSource

Implements: IDataSource

Inherited Members DataSource.NameDataSource.DescriptionDataSource.CalculatedFields

Constructors

Initializes a new instance of the CsvDataSource class.

C#
public CsvDataSource()

Properties

Gets a DataColumnCollection defining each column of the CSV data source.

C#
public DataColumnCollection Columns { get; }
Remarks:

When left empty, Columns are inferred from the data itself: If header row is available, it is used to infer column names; The type of each column is considered string.

Gets or sets the symbol used for comments in the CSV document.

C#
public char CommentToken { get; set; }

Gets or sets a value indicating whether consecutive field separators are treated as one in the CSV document.

C#
public bool ConsecutiveFieldSeparatorsAsOne { get; set; }

Gets or sets a value indicating whether consecutive record separators are treated as one in the CSV document.

C#
public bool ConsecutiveRecordSeparatorsAsOne { get; set; }

Gets or sets the format used when parsing dates.

C#
public string DateTimeFormat { get; set; }

Gets or sets the decimal separator used when parsing numbers. Invariant culture's '.' separator is used by default.

C#
public string DecimalSeparator { get; set; }

Gets or sets the escape format of the CSV document.

C#
public CsvEscapeFormat EscapeFormat { get; set; }

Gets or sets the set of characters used as field separators (delimiters).

C#
public char[] FieldSeparators { get; set; }

Gets or sets a value indicating whether the CSV document has a header row.

C#
public bool HasHeaders { get; set; }

Quote

char

Gets or sets the symbol used for escaping.

C#
public char Quote { get; set; }

Gets or sets the character used as record separator.

C#
public char[] RecordSeparators { get; set; }

Source

object

Gets or sets the source of the CSV document.

C#
public object Source { get; set; }
Remarks:

The supported sources are:

  1. Uri
  2. string
  3. Stream
  4. TextReader

Gets or sets the thousand separator used when parsing numbers. Invariant culture's ',' separator is used by default.

C#
public string ThousandSeparator { get; set; }