How to handle large string grids?

I find that I may have to use a String Grid of less than 10 columns, but about 50 thousand rows.

Experiments have shown that this is a very immune god of the processor.

Any pointers?

Code or components?

Preferably Delphi (7) embeds either TMS (for which I have a license) or FOSS (for commercial use).


Update: please don't just tell me to use Virtual Tree View, etc. Please tell me why so that I can learn something. Thank.

+5
source share
4 answers

I do not think the problem is with adding this number to the TStringGrid.

100k 1 (700 ) ( , ).

procedure TForm1.btn1Click(Sender: TObject);
Const
  arr : array[1..5] of string = ('One','Two','Three','Four','Five');
  Rows = 100000;
var
  I: Integer;
  F,E : Integer;
begin
  StringGrid1.RowCount := Rows;
  F := GetTickCount;
  for I := 0 to Rows do
  begin
    StringGrid1.Cells[1,I] := Arr[1] + IntToStr(I);
    StringGrid1.Cells[2,I] := Arr[2]+ IntToStr(I);
    StringGrid1.Cells[3,I] := Arr[3]+ IntToStr(I);
    StringGrid1.Cells[4,I] := Arr[4]+ IntToStr(I);
    StringGrid1.Cells[5,I] := Arr[5]+ IntToStr(I);
  end;
  E := GetTickCount;
  ShowMessage(Inttostr(E-F));
end;

, , ? , , 50 WHATEVER GRID, , " " .

, , .

+5

TListView ( , )

+5
+4

All Articles