ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, String, String, String, Boolean, String)

Exports the specified rows from the grid to the specified file as delimited text.

[Visual Basic]

Overloads Public Sub ExportToDelimitedFile( _

ByVal filename As String, _

ByVal selector As RowSelectorEnum, _

ByVal delim As String, _

ByVal prefix As String, _

ByVal suffix As String, _

ByVal headers As Boolean, _

ByVal encoding As String _

)

[C#]

public void ExportToDelimitedFile(

string filename,

RowSelectorEnum selector,

string delim,

string prefix,

string suffix,

bool headers,

string encoding

);

[Delphi]

public procedure ExportToDelimitedFile(

filename: String;

selector: RowSelectorEnum;

delim: String;

prefix: String;

suffix: String;

headers: Boolean;

encoding: String

); overload;

Example

The following code exports all rows in the grid (delimited by a comma, without a prefix or suffix, displaying column headers, and ASCII encoded) to a delmited file in the temp directory:

·      Visual Basic

       Me.C1TrueDBGrid1.ExportToDelimitedFile("c:\temp\composers.csv", C1.Win.C1TrueDBGrid.RowSelectorEnum.AllRows, ",", " ", " ", True, "ASCII")

·      C#

       this.c1TrueDBGrid1.ExportToDelimitedFile(@"c:\temp\composers.csv", C1.Win.C1TrueDBGrid.RowSelectorEnum.AllRows, ",", " ", " ", true, "ASCII");

·      Delphi

       Self.C1TrueDBGrid1.ExportToDelimitedFile('c:\temp\composers.csv', C1.Win.C1TrueDBGrid.RowSelectorEnum.AllRows, ',', ' ', ' ', True, 'ASCII');

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace | C1TrueDBGrid.ExportToDelimitedFile Overload List


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.