News in versions: FastGrid 1.0, TreeGrid 17.0
FastGrid FastSheet ExamplesSamples DocumentationDoc Download Licensing Prices Buy Development
services
References References Contacts
TreeGrid Gantt chart SpreadSheet ExamplesSamples DocumentationDoc Download Licensing Prices Buy Contacts
FastGrid documentation
Search in documentation
FastGrid versions compatibility

Changes log (txt file) Compare FastGrid 1.0 & TreeGrid 17.1

Using in JavaScript frameworks

Angular Ember Express React Svelte Vue Other frameworks NodeJS server SalesForce LWC

Data and creating FastGrid

Simple examples of creating FastGrid Create FastGrid Display grid Access grid by API Sheets, more grids switched in one place Layout and configuration Data rows, columns, toolbars, images Changes in data rows, columns, toolbars Saving changes to server Mark changes Loading children on expand parent Short format

Layout - grid parts

Parts - ColParts and RowParts Part size Part scroll position Sets Column sets Row sets

Toolbars

Toolbar Cells Icon Height Width Toolbar position Dragging and manipulating cells Special toolbars

Rows and columns
Default rows, columns, cells, toolbars
Row and column identity

Row / column id Row / column index Row / column name

Row and column manipulation

API to get grid objects Auto added columns & rows on scroll Blocks of rows / columns Adding / copying / moving Deleting Showing and hiding Layout menu Selecting rows and columns Fill cell values by dragging Locking grid against changes Undo & redo

Row and column tree

Row and column tree Row tree Column tree Expand & collapse

Cells
Cell values and attributes

Read and write any values by API Cell value Cell attributes Cell value & attributes in UTF8 Store

Editing cells

Editing During editing Validation and errors

Cell images

Row cell side icons Icons definition Mark icons and charts Mark icons list Row cell floating images

Cell size

Row height Column width Resizing rows and columns Padding Margin Cell span

Cell style

Grid style and look Cell style permissions Cell style Cell outer border Cell inner border Alternate row & column background

Other cell features

Cell hyperlink Cell tooltip Static cells Other cell attributes Row & column attributes to speed up

Cell types and formats
Cell type and format Range - more values / ranges in cell String type Html type Auto type
Bool type

Bool type Check side icon Bool type & Check side icon

Number type

Format Localization

Date type

Format Localization Calendar

Calculations - formulas
JavaScript formulas

JavaScript formulas Aggregate functions String aggregate functions Other functions

Editable formulas

Formula rules Formula attributes Defined names for editable formulas Conditional functions Lookup functions Cell reference functions Logical functions Informational functions Mathematical functions Trigonometry functions Rounding numbers Number conversions String functions Date functions Summary functions

Dialogs and menus

Dialog Dialog Place Dialog API Menu definition in Script Cell menu List Suggest

Features
Sorting rows / columns

Sorting Sorting settings Comparing strings

Grouping rows / columns

Grouping Grouping settings Comparing strings Pivot grid

Filtering rows and columns

Filtering Filter settings Comparing strings

Search in cells Import files to grid
Export files

Export files Export and copy to clipboard CSV data

Copy & paste via system clipboard

Copy & paste Copy to clipboard Paste from clipboard

Printing

Print Print to PDF

Global grid settings
Grid size & scroll

Grid size Grid scrollbars Paging and view Media rules - responsive design

Saving settings in storage or cookies
Focus and hover cells

Focus cell and cell ranges Mouse hover cells Highlight cells, rows and columns

Events

Mouse events Key events API events

Language

Translation Languages

Messages

Message Message style

Other API

API for iterating rows and columns Paint and repaint Various API methods

Debug & files

Debugging FastGrid files

UTF8 Store - fast & short data
Introduction - License & download

Basic description Main advantages Basic usage License Download Documentation

Script language implementations

JavaScript C# JAVA PHP

Suggested ucodes

Bits - small integers or enums Integers or enums with strings Date and time Floating point numbers Special strings

Basic ucodes

Integer 1 char String 1 char Date 1 char Bits 1 char Integer 2 chars String 2 chars Date 2 chars Float 2 chars Integer 3 chars String 3 chars Date 3 chars Integer and double float 5 chars String 5 chars Date 5 chars Fixed length string Separated strings Adjacent strings Prefix for escaping string Fixed length data Unused custom codes Prefix for stored separator or length Prefix for stored base number Unused basic ucodes

Complex ucodes

chars signed decimals multiple limits varstrings escape base chars2 signed2 decimals2 multiple2 limits2

Internal coding Profiling times for ucode options Function reference

Row and column identity

FastGrid documentation

Row / column id

Row, Col string / int

id

GetAttr
Unique identification of the row or column.
The row ids must be unique among all rows. The column ids must be unique among all columns.
But it is recommended to have unique ids among all rows, columns, toolbars and toolbar cells.
If not set, the row id is automatically generated according to the RowId, RowIdChars, RowIdPrefix and column id by ColId, ColIdChars, ColIdPrefix.
If set RowIndex / ColIndex & 128, the id is generated as row / column index.
If the item is defined by number or string and not by object, it is set as D attribute if it is existing default object and also as id attribute, for example Head:[ "Header" ] is the same as Head:[ { D:"Header", id:"Header" } ]
Cfg string

RowIdPrefix

[""] GetCfgAttr
Prefix added before auto generated row ids.
Cfg string

RowIdChars

GetCfgAttr
List of characters used for generating row ids, used in the order according to the RowId (0 means empty id, 1 means first character, 2 second, etc.).
If not set (by default), the ids are numbers, directly the RowId.
Cfg int

RowId

[1] GetCfgAttr SetCfgAttr
Actual number for auto generating row ids id. It is incremented for every auto generated row id.
Cfg bits

RowIds

[0] GetCfgAttr SetCfgAttr
Controls auto generating ids for newly added or copied rows and for rows moved from another grid.
1. bit &1 - if set, assigns always the lowest id (reuses ids from removed rows) to newly added rows.
2. bit &2 - if set, preserves ids of rows moved from another grid, except if the id already exists.
3. bit &4 - if set, preserves ids of rows copied from another grid, except if the id already exists.
4. bit &8 - if set, preserves ids of rows moved from another grid, also if the id already exists, but the row is deleted.
Grid variable Row[id]

Rows

All rows (not toolbars) in grid by their id. Or if set RowIndex&128, also by their index.
Cfg string

ColIdPrefix

[""] GetCfgAttr
Prefix added before auto generated column ids.
Cfg string

ColIdChars

["ABCDEFGHIJKLMNOPQRSTUVWXYZ"] GetCfgAttr
List of characters used for generating column ids, used in the order according to the ColId (0 means empty id, 1 means first character, 2 second, etc.).
If not set, the ids are numbers, directly the ColId.
By default the ids are generated from upper case letters, ColId = 0 = "", 1 = "A", 2 = "B", ... 26 = "Z", 27 = "AA", 28 = "AB", ... 52 = "AZ", 53 = "BA", ... 702 = "ZZ", 703 = "AAA", ...
Cfg int

ColId

[1] GetCfgAttr SetCfgAttr
Actual number for auto generating column ids id. It is incremented for every auto generated column id.
Cfg bits

ColIds

[0] GetCfgAttr SetCfgAttr
Controls auto generating ids for newly added or copied columns and for columns moved from another grid.
1. bit &1 - if set, assigns always the lowest id (reuses ids from removed columns) to newly added columns.
2. bit &2 - if set, preserves ids of columns moved from another grid, except if the id already exists.
3. bit &4 - if set, preserves ids of columns copied from another grid, except if the id already exists.
4. bit &8 - if set, preserves ids of columns moved from another grid, also if the id already exists, but the column is deleted.
Grid variable Col[id]

Cols

All columns in grid by their id. Or if set ColIndex&128, also by their index.
Row, Col int

Index

[0 / 1 / 2] GetAttr SetAttr
If set, the row or column shows the columm or row indexes / ids instead of the cell values.
0 - the row / column shows cell values normally.
1 - the row shows the column indexes or the column shows the row indexes.
2 - the row shows the column ids or the column shows the row ids.
By default it is 1 in Index rows / columns, 2 - Header rows / columns and 0 in all other rows and columns.
It is not read from Row.D / Col.D!.
Row, Col int

NoIndex

[0 / 1 / 2] GetAttr SetAttr
If set, the row / column is excluded from generating index and is displayed as empty in rows / columns with Index = 1
If set to 2 it also ignores the Index when reading cell value.
By default it is 1 for all special rows and columns (Header, Index, Filter, Panel), 2 for Empty rows and columns and 0 for all normal data rows and columns.
API event string / int

OnGenerateId

(Grid grid, object item, string / int id, int type)
Called when generating id for any row, column, toolbar or toolbar cell in grid.
It is not called if the item has set its unique id.
type is item kind: 0 - row, 1 - column, 2 - group row, 3 - goup column, 4 - toolbar, 5 - toolbar cell.
Grid method bool

SetRowId

(Row row, string / int id)
Changes the row id and updates references to the row. It does not mark the change, the row will be uploaded under the new id and the old id is forgot.
Returns true for success or false if some row with the id already exists in the grid.

Row / column index

Cfg bits

RowIndex

[15] GetCfgAttr
If and how will be generated row indexes.
1.bit &1 - generates index for normal rows.
2.bit &2 - generates index also for collapsed rows.
3.bit &4 - generates index also for manually hidden rows.
4.bit &8 - generates index also for filtered rows.
5.bit &16 - generates index also for deleted rows.
6.bit &32 - resets index on part - every part starts by the RowIndexStart. If set, edit formulas use id instead of index.
7.bit &64 - resets index on children - every children start by the RowIndexStart. If set, edit formulas use id instead of index.
Cfg int

RowIndexStart

[1] GetCfgAttr
First number for generating row index.
Cfg string

RowIndexChars

GetCfgAttr
List of characters used for generating row index, used in the order according to the index number (0 means empty id, 1 means first character, 2 second, etc.).
If not set (by default), the indexes are numbers, directly from the RowIndexStart.
To generate row number index with leading zeros, e.g. for 4 digits like 0001, 0002, ..., set RowIndexStart = 1112, RowIndexChars = "0123456789".
Cfg bits

ColIndex

[15] GetCfgAttr
If and how will be generated column indexes.
1.bit &1 - generates index for normal columns.
2.bit &2 - generates index also for collapsed columns.
3.bit &4 - generates index also for manually hidden columns.
4.bit &8 - generates index also for filtered columns.
5.bit &16 - generates index also for deleted columns.
6.bit &32 - resets index on part - every part starts by the RowIndexStart.
7.bit &64 - resets index on children - every children start by the RowIndexStart.
Cfg int

ColIndexStart

[1] GetCfgAttr
First number for generating column index.
Cfg string

ColIndexChars

["ABCDEFGHIJKLMNOPQRSTUVWXYZ"] GetCfgAttr
List of characters used for generating column index, used in the order according to the index number (0 means empty id, 1 means first character, 2 second, etc.).
If not set, the indexes are numbers, directly from the ColIndexStart.
By default the indexes are generated from upper case letters, index number = 0 = "", 1 = "A", 2 = "B", ... 26 = "Z", 27 = "AA", 28 = "AB", ... 52 = "AZ", 53 = "BA", ... 702 = "ZZ", 703 = "AAA", ...
Row, Col int

Index

[0 / 1 / 2] GetAttr SetAttr
If set, the row or column shows the columm or row indexes / ids instead of the cell values.
0 - the row / column shows cell values normally.
1 - the row shows the column indexes or the column shows the row indexes.
2 - the row shows the column ids or the column shows the row ids.
By default it is 1 in Index rows / columns, 2 - Header rows / columns and 0 in all other rows and columns.
Row, Col int

NoIndex

[0 / 1 / 2] GetAttr SetAttr
If set, the row / column is excluded from generating index and is displayed as empty in rows / columns with Index = 1
If set to 2 it also ignores the Index when reading cell value.
By default it is 1 for all special rows and columns (Header, Index, Filter, Panel), 2 for Empty rows and columns and 0 for all normal data rows and columns.
Grid method string

GetIndex

(Row / Col item, int plus = 0)
Returns index of the row or column according to RowIndex... / ColIndex... settings. If the item has no index, returns empty string.
If set plus, adds it to the row position before converting to the index.
Grid method Row / Col

GetByIndex

(string index, string part = null, int repaint = 0)
Returns row or column according to its generated index.
If the row / column with given index does not exist and the part is set to some row or column part id, it adds required amount of rows / column to this part to create the row / column with the index.
repaint can be set to paint changes if the row / column is added: 1 calls Paint, 2 - calls Paint and scrolls part to the item, 3 - calls Paint and scrolls and focuses the item.
Grid method int / string

GetRowIndex

(int / string index, bool type = 0)
For type = 0 converts row index to the row position.
For type = 1 converts row position to the row index.
Grid method int / string

GetColIndex

(int / string index, bool type = 0)
For type = 0 converts column index to the row position.
For type = 1 converts column position to the row index.

Row / column name

Row, Col string

Name

GetAttr SetAttr
Row / column name that is shown as in menus, messages and toolbars.
If not set, value from column / row with Names or row / column index or row / column id is used.
Row, Col bool

Names

GetAttr SetAttr
If set the row values are used as Name for the columns in the row set. Or the column values are used as Name for the rows in the column part set.
Grid method string

GetName

(Row / Col item)
Returns name of the row or column item according to the Name / Names.
API event string

OnGetName

(Grid grid, Row / Col / Toolbar item, string name)
Called to get row / column / toolbar Name. name is actually chosen name for the row.