Hi all,
I'm new to NextGrid. It seems that it is rather different from StringGrid and AdvStringGrid (TMS Software) I used so far.
I try to load a csv file with 29 columns and 5062 rows. I get an out of bounds (-1) error when I load it with NextGrid61.Serialize.LoadFromCSV.
My code:
NextGrid61.Serialize.SeparatorChar := ';'; NextGrid61.Serialize.Encoding := ekAnsi; for i := 1 to 29 do begin NextGrid61.Columns.Add(TNxNumberColumn6, 'Test', 'T'); NextGrid61.Cells[i-1, 0] := IntToStr(i); {test to assign values to cells} end; ShowMessage('ColCount: ' + IntToStr(NextGrid61.ColCount) + ' Colums.Count: ' + IntToStr(NextGrid61.Columns.Count)); //NextGrid61.AddRow(5062); NextGrid61.RowCount := 5062; for i := 1 to NextGrid61.RowCount do NextGrid61.Cells[0, i-1] := IntToStr(i); {test to assign values to cells} NextGrid61.Serialize.LoadFromCSV('C:\Data\test.csv');
Isn't it possible to load a csv file without knowing number of columns and rows? If the separator is set it should be possible to load the file automatically without knowing number of columns and rows beforehand.
I could not find a demo project using LoadFromCSV. That suprized me because loading data from a text file into a grid seems to me a basic task.
Is there no other documentation than the user guide, "tipps and tricks" and the source code?
I would be glad to see an example how to use it.
Thanks!