vcl-dxmdaset-dot-tdxcustommemdata-a12da0d8.md
Specifies the column separator character for data exported to plain text files.
property DelimiterChar: Char read; write;
| Type | Description |
|---|---|
| Char |
Specifies the character used to separate columns in data exported in plain text format.
|
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.
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;
dxMemData1->DelimiterChar = ";"; // Sets a semicolon as a column separator
dxMemData1->SaveToTextFile(ExtractFileDir(Application->ExeName) + "data.txt");
dxMemData1->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
}
The DelimiterChar property’s default value is #9 (Tab).
See Also