procedure TForm1.Grid1GetValue(Sender: TObject; const ACol, ARow: Integer; var Value: TValue); begin { Occurs when the grid needs to retrieve a value from an external repository to use as the content of one of the cells in this grid. Write an OnGetValue event handler to take specific actions when you retrieve a value from an external repository to use as the content of one of the cells in this grid. } // Value := 'abc'; // for all TColumns if NOT USING verify any condition! example: if ACol = 0 then ... ; // inc(iCounterToGetValueEvent); // all time that "GetValues" is called ... many and many time... include in "Scroll" rows... up or down! // // "n" Columns X "n" Rows + "n" Visible Rows on Grid // // Pay attention on first time, and later, when scrolling the rows to up or down // Caption := Format('Counting... iCounterToGetValueEvent = %d, VisibleRows = %d', [ { } iCounterToGetValueEvent, { } Grid1.VisibleRows { } ]); end;
end.
(n rows = visible rows) x ( n columns=3) + (visible rows=13) or "N" calls of the event x (n columns) x (x rows)
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3