VCL
TAdvSpreadGrid
Powerful spreadsheet function calculation support added to the full TAdvStringGrid feature set
Tips and Frequently Asked Questions
Using custom functions directly
The OnIsCustomFunction and OnCalcCustomFunction events can be used to implement custom functions for TAdvSpreadGrid. Via the event OnIsCustomFunction event, the grid is informed what names should be treated as custom functions and the OnCalcCustomFunction performs the actual calculation of the function. With the example code presented, the MYTEST function is added that returns as a result parameter * 2:
procedure TForm2.AdvSpreadGrid1CalcCustomFunction(sender: TObject; var func: string; var param: Double); begin if func='MYTEST' then param := param *2; end; procedure TForm2.AdvSpreadGrid1IsCustomFunction(sender: TObject; var func: string; var match: Boolean); begin match := func='MYTEST'; end; procedure TForm2.FormCreate(Sender: TObject); begin advspreadgrid1.Cells[1,1] := '1'; advspreadgrid1.Cells[1,2] := '=MYTEST(A1)'; advspreadgrid1.Recalc; end;
Compatibility
- Delphi 7, 2007, 2010, 2009, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney, 11 Alexandria, C++Builder 2007, 2009, 2010, XE, XE2, XE3, XE4, XE5, XE6, XE7, XE8, 10 Seattle, 10.1 Berlin, 10.2 Tokyo, 10.3 Rio, 10.4 Sydney, 11 Alexandria (Professional/Enterprise/Architect)
Licensing
- Licensing FAQ
- License for commercial use: Single developer license, Small team license, Site license
- Includes full source code
- Ask questions to our engineers related to purchased product via Support Center
- Free 1 year updates and new releases
- After 1 year, a discount renewal is offered for a 1 year extension. *
* offer valid for 30 days after end of license. Discount price is subject to change.