[Lazarus] StringGrid SaveToCSV should consider column visibility
Alexsander Rosa
alexsander.rosa at gmail.com
Mon Oct 15 19:07:42 CEST 2012
I've managed to modify Grids.pas (SaveToCSVStream, line 10452) for the
headers:
* for i := 0 to ColCount-1 do begin*
* c := ColumnFromGridColumn(i);*
* if c=nil then*
* HeaderL.Add(Cells[i, 0])*
* else*
* if c.Visible then*
* HeaderL.Add(c.Title.Caption);*
* end;*
But the other "IF" for the data did not work:
* for i:=StartRow to RowCount-1 do begin*
* c := ColumnFromGridColumn(i);*
* if c <> nil then*
* if not c.Visible then Continue;*
* Rows[i].StrictDelimiter := False; //force quoting of strings that
contain whitespace or Delimiter*
* Rows[i].Delimiter:=ADelimiter;*
* Lines.Add(Rows[i].DelimitedText);*
* end;*
Any ideas?
--
Atenciosamente,
Alexsander da Rosa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20121015/51730920/attachment-0002.html>
More information about the Lazarus
mailing list