Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetComponentDelphiDemoFiremonkeyIOSOSXWindows

Custom TGridHelper Component Expands TGrid In #Delphi Firemonkey On Android And IOS

Delphi XE8 Firemonkey Grid Helper Cells Add Android IOSDeveloper Barış Atalay from Turkey has released a custom TGridhelper component that adds on some additional functionality to the TGrid component that ships with Delphi XE8 Firemonkey. The main functionality that TGridHelper seems to add is an IncRow function and a Cells property which you can access like a TStrings as far as assigning values to cells in a row. It looks like it was built for Delphi XE7 but should probably work in Delphi XE8 and Appmethod as well. The component is free and available with source from Github. It should work cross platform on Android, IOS, OSX, and Windows. There is also a demo which shows the functionality in action. Additionally it shows how to custom draw each cell in the OnDrawColumnCell event. Here is some sample source code showing the two new ways TGridHelper has of adding content to cells:


procedure TForm8.Button1Click(Sender: TObject);
var I: Integer;
begin
GridHelper1.ClearItems;
for I := 0 to 5 do
begin
GridHelper1.IncRow;
GridHelper1.Cell[I, 0]:= 'sayi ' + I.ToString;
GridHelper1.Cell[I, 1]:= 'sayi ' + I.ToString;
GridHelper1.Cell[I, 2]:= 'sayi ' + I.ToString;
GridHelper1.Cell[I, 3]:= 'sayi ' + I.ToString;
GridHelper1.Cell[I, 4]:= 'sayi ' + I.ToString;
GridHelper1.Cell[I, 5]:= 'Y';
end;
end;

procedure TForm8.Button2Click(Sender: TObject);
var I: Integer;
begin
GridHelper1.ClearItems;
for I := 0 to 5 do
begin
GridHelper1.IncRow;
GridHelper1.AddValue[0]:= 'sayi ' + I.ToString;
GridHelper1.AddValue[1]:= 'sayi ' + I.ToString;
GridHelper1.AddValue[2]:= 'sayi ' + I.ToString;
GridHelper1.AddValue[3]:= 'sayi ' + I.ToString;
GridHelper1.AddValue[4]:= 'sayi ' + I.ToString;
GridHelper1.AddValue[5]:= 'Y';
end;
end;

Head over and download the full source code of this TGridHelper component for Delphi Firemonkey.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
DelphiWindows

Give AI Coding Assistants A Memory That Survives Every Session

DelphiDemoFiremonkeyLibraryShowcaseWindows

Run Large Language Models Natively In Object Pascal

Code SnippetDelphiDemoLibraryShowcaseWindows

Windows CLI To Download, Manage, And Chat With Local AI Models

DelphiDemoOSXWindows

Download, Run, And Chat With Local LLMs On Windows And macOS

Sign up for our Newsletter and
stay informed
[mailpoet_form id="1"]

Leave a Reply