ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.ExportToDelimitedFile Method (String, RowSelectorEnum, 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 _

)

[C#]

public void ExportToDelimitedFile(

string filename,

RowSelectorEnum selector,

string delim

);

[Delphi]

public procedure ExportToDelimitedFile(

filename: String;

selector: RowSelectorEnum;

delim: String

); overload;

Example

The following code exports all rows in the grid (delimited by a comma) to a delimited file in the temp directory:

·      Visual Basic

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

·      C#

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

·      Delphi

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

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.