All items used in this tutorial are explained in comments in the tutorial source html file at Tutorials/Start/02-Advanced_start_grid.html
FastGrid library can be added to any project by copying FGridE.js file to the project where is visible to browser, usually in some public folder.
The newest FastGrid script can be downloaded from https://www.treegrid.com/attach/FGrid/FGridE.js
FastGrid library can be imported to any html page by including the FGridE.js file as
<script src="path/FGridE.js"></script>
FastGrid can be created and shown in the html as tag <fast-grid src={sources} ></fast-grid>
where sources is JavaScript object that defines grid layout and data, for example:
<fast-grid src="{ Cols:["A","B","C"], Head:[ "Header" ], Body:[ { V:[1,2,3] }, { V:[4,5,6] } ] }" style="height:200px;"></fast-grid>
Note that <fast-grid> as custom html tag must have closing tag </fast-grid>.
Or FastGrid can be created by script in existing HTML tag as FGrid.FastGrid(sources,tag);
where sources is JavaScript object that defines grid layout and data, and tag is HTML tag object or its id to create grid inside, for example:
<div id="GridTag" style="height:200px;"></div>
<script>var grid = FGrid.FastGrid({ Cols:["A","B","C"], Head:[ "Header" ], Body:[ { V:[1,2,3] }, { V:[4,5,6] } ] }, "GridTag")</script>
Created FastGrid object can be accessed globally by FGrid.Grids[grid_id].
The FastGrid API event handlers can be assigned in FastGrid sources in Events tag.
The full simple html application using FastGrid API methods and events:
<script src="https://www.treegrid.com/FGrid/FGridE.js"></script>
<script>
function readValue() { alert("Read value from cell [1,A]: "+ FGrid.Grids.Grid1.Get(1,"A")); }
function changeValue(grid,row,col,val) { grid.Set(row,col,"",val,1); }
function onSetValue(grid,row,col,value,changes){ if(changes) console.log("Value "+value+" set to cell ["+row.id+","+col.id+"]"); }
function onClick(grid,row,col){ console.log("clicked cell ["+row.id+","+col.id+"] with value "+grid.GetValue(row,col)); }
function onReady(grid){ console.log("FastGrid is ready"); }
FGrid.Sources.Layout1 = {
Cols:["A","B",{id:"C",Width:80}], Head:[ "Header" ], Body:[ { V:[100,200,300] }, { V:{A:400,B:500,C:600} }, { V:"|700|800|900" } ]
};
FGrid.Sources.Events1 = { Events: { OnSetValue: onSetValue, OnReady: onReady, OnClick: onClick } };
</script>
<fast-grid src="['Layout1','Events1']" id="Grid1" style="height:300px;"></fast-grid>
<button onClick="readValue()">Read value [1,A]</button>
<button onClick="changeValue(FGrid.Grids.Grid1,1,'A','XXX');">Change value [1,A]</button>
FastGrid documentation index and glossary is at https://www.treegrid.com/FDoc/Glossary.htm
Search FastGrid attributes, API methods and events in doc at https://www.treegrid.com/FDoc/SearchAttr.html
FastGrid is commercial software.
A license is required to use it in production.
Information about licensing is at https://www.treegrid.com/Licensing
License prices are at https://www.treegrid.com/Prices
Online purchase can be done in e-shop at https://www.treegrid.com/Purchase