OK In case people want to know I made a workaround to the the TMS DBAdvGrid to export the CSV file.
I added a new property to TAdvStringGrid
public {properties}
property HideCSVHeader: boolean read FHideCSVHeader write FHideCSVHeader;
and changed the following code:
procedure TAdvStringGrid.OutputToCSV(FileName:String;appendmode: Boolean;
Unicode: boolean);
....
//changed this code further down the procedure:
//for z := SaveStartRow to SaveEndRow do
//Into:
MyStartRow:= SaveStartRow;
if HideCSVHeader then Inc(MyStartRow);
for z := MyStartRow to SaveEndRow do
Then when I call
procedure TForm1.BtnExportClick(Sender: TObject);
var
Filename: string;
succes: Boolean;
begin
succes:= True;
if ExportSaveDialog.Execute then begin
Filename:= ExportSaveDialog.FileName;
try
DBGridExportExact.Delimiter:= ';';
DBGridExportExact.AlwaysQuotes:= True;
DBGridExportExact.QuoteEmptyCells:= True;
DBGridExportExact.SaveHiddenCells:= True;
DBGridExportExact.HideCSVHeader:= True;
DBGridExportExact.SaveToCSV(bestandsnaam);
except
succes:= False;
end;
if not(succes) then StatusLabel.Caption:= 'Error bla bla';
end;
end;