Set TotalRowCount

TAdvStringGrid, Delphi 7



I load a CSV file into the grid. It loads correctly. TotalRowCount remains at the RowCount default value from design time.



How do I get the TotalRowCount to reflect the actual number of rows loaded from the CSV file?

I don't see a problem.

Test code on a default grid:


procedure TForm5.FormCreate(Sender: TObject);
begin
  advstringgrid1.SaveFixedCells := false;
  advstringgrid1.LoadFromCSV('c:\tmssoftware\cars.csv');
  caption := inttostr(advstringgrid1.TotalRowCount);
end;

and this shows TotalRowCount correct in the form caption.

My error. I was not doing zero based indexing.