Skip to main content

TdxCustomMemData.DelimiterChar Property

Specifies the column separator character for data exported to plain text files.

Declaration

property DelimiterChar: Char read; write;

Property Value

Type Description
Char

Specifies the character used to separate columns in data exported in plain text format.

Remarks

The DelimiterChar property value affects the following data import and export methods:

SaveToTextFile(string)
Saves stored data to a plain text file.
LoadFromTextFile(string)
Loads data from a plain text file.
SaveToStrings(TStrings)
Saves data to a specified string list.
LoadFromStrings(TStrings)
Loads data from a specified string list.

Example

The following code example sets a semicolon as a column separator and copies data between two memory-based datasets through a plain text file.

  dxMemData1.DelimiterChar := ';';  // Sets a semicolon as a column separator
  dxMemData1.SaveToTextFile(ExtractFileDir(Application.ExeName) + 'data.txt');
  dxMemData2.DisableControls;  // Disables data synchronization with bound controls
  try
    dxMemData2.DelimiterChar := ';';  // Sets a semicolon as a column separator
    dxMemData2.LoadFromTextFile(ExtractFileDir(Application.ExeName) + 'data.txt');
  finally
    dxMemData2.EnableControls;  // Re-enables data synchronization with bound controls
  end;

Default Value

The DelimiterChar property’s default value is #9 (Tab).

See Also