A live grid in a few lines.
Add typed columns, append rows by key, and update them later from any thread. The same API in Delphi, C++ Builder and C#.
dotnet add package esegece.sgcGrid.WinForms
C++ Builder and C# versions
uses
Forms, Classes, Controls,
sgcGrid_Columns, sgcGrid_Data, sgcGrid_VCL;
procedure CreateGrid(aForm: TForm);
var
oGrid: TsgcVCLGrid;
begin
oGrid := TsgcVCLGrid.Create(aForm);
oGrid.Parent := aForm;
oGrid.Align := alClient;
// the columns: FieldName, Caption and DataType
oGrid.Columns.Add('Symbol', 'Symbol');
oGrid.Columns.Add('Price', 'Price', gdtFloat).DisplayFormat := '0.00';
oGrid.Columns.Add('Volume', 'Volume', gdtInteger);
// one row per key, the values in column order
oGrid.Data.AppendRow('MSFT', ['MSFT', 412.5, 1200]);
oGrid.Data.AppendRow('AAPL', ['AAPL', 228.1, 3400]);
// later, from any thread: update the row of a key by field name
oGrid.Data.UpdateRow('MSFT', ['Price', 'Volume'], [413.1, 1350]);
end;