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

Filtering rows / columns

FastGrid documentation

The filters are set in row / column with Kind = "Filter", usually set by D = "Filter".
Or custom filters are set by SetFilter API method.
Row, Col string

D

=

"Filter"

Default row or column to show cell filters. Every cell can have set its filter operator in Filter object.
It is expected to place only in fixed sections (rows or columns) with maximally 30 items.
Cell, Tool string

D

=

"FilterAction"

Default cell or toolbar cell to show filter icon to switch among OFF, OR and AND operators between filters.
If placed to Filter row or column, it controls only this filter and changes its FilterAction attribute.
If placed anywhere else, it controls all filters and changes grid FilterAction attribute among 0,1,2 values.
Set BoolMin = 0 to switch only between OFF and AND. Set BoolMax = 0 to switch only between OFF and OR.
Tool string

D

=

"FilterTree"

Default toolbar cell to combo box to choose value for FilterTree attribute from popup list.
Row, Col string

FilterPart

["DefRowPart" / "DefColPart" / ""] GetAttr SetAttr
Comma separated string or array of part ids that will be filtered by this Filter row.
The item can be set also to "DefRowPart" as DefRowPart or "DefColPart" as DefColPart.
Default value is "DefRowPart" in D="Filter" row, "DefColPart" in D = "Filter" column and none in all other rows and columns.
Row, Col string[id]

Filter

GetFilter ChangeFilter
Defines filter operators for individual Filter cells. The Filter cells values are defined in standard V attribute.
Defined as an object with values assigned to column or row ids. For example: { id:1, Filter:{ C:3, D:11 }, V:{ C:100, D:"XXX" } }
For row it supports also Array and String definition by AIndex like A attribute, but these definitions have slower processing and are used rarely.
It can be one of predefined filters:
Off:0 - Off
Number filter:1 - Equal, 2 - Not equal, 3 - Less than, 4 - Less than or equal, 5 - Greater than, 6 - Greater than or equal
String filter:7 - Begins with, 8 - Does not begin with, 9 - Ends with, 10 - Does not end with, 11 - Contains, 12 - Does not contain
Range filter:13 - Equal all, 14 - Not equal all
Cell bool

NoFilterBy

GetAttr SetAttr
If set to Filter cell, the cell does not show filter operator and does not provide filtering.
This cell is still editable, set NoEdit: 1 to not edit it.
There is still reserved place for the Filter icon, to hide it set LeftIcons : "".
Cell any

DefaultFilter

[1 / 11] GetAttr SetAttr
If set, automatically sets given filter value after change of the Filter cell value if it has not set Filter yet.
Default value is 1 for types Number, Date and Bool and 11 for types String, Html and Auto.
Cell any

FilterOff

[0 / ""] GetAttr SetAttr
When this value is entered to the Filter cell and it has set Filter, the Filter for the cell is cleared.
For Bool type it slightly differs: after which Bool value in BoolCycle clears the Filter for the cell.
Default value is 0 for Bool type and "" for other types.
Cfg bool

ClearFilterOff

GetCfgAttr SetCfgAttr
If set, clears the filter cell value when chosen the 0 (off) filter operator.
Part string[id]

Filter

GetFilter SetFilter
Active custom filters defined for given row or column part.
Defined for example as: Body:{Filter:{MyFilter:"A>10 || B<20"}} The filter string is the filter JavaScript formula in string. It has the same syntax as JavaScript Formula.
If filters rows, it can use variables Grid, Row and column ids as the Row cell values, e.g. F1:"B>5&&C!='AB'").
If filters columns, it can use variables Grid and Col. The column cells can be read by "Grid.Get('xxx',Col)".
Grid method bool

HasFilter

(string part = null, bits type = 13)
If the part has some filter set. If the part is null, checks all parts in grid.
type controls which filter is checked:
1., 2. bit &3 = 1 - has any active filter in Filter row / column, 2 - has any filter set in Filter row / column (even if the FilterAction is 0).
3. bit &4 = 4 - has any custom filter set by SetFilter method.
4. bit &8 = 8 - has set Search filter.
Grid method any

GetFilter

(string part = "Body", int type = 1)
Returns filters set in the part.
type controls which filters to return:
1 - all active filters set by Filter rows / columns.
2 - all set filters set by Filter rows / columns (even if the FilterAction is 0).
Returns two dimensional array as [[row1,col1,operator1,value1],[row2,col2,operator2,value2],...].
4 - returns all custom filters in object as [name] = filter_string. If the filter was set by FilterRange, returns the created filter that was sent to SetFilter method.
8 - returns Search filter function.
Grid method void

ChangeFilter

(any[] cols = null, string[] values = null, string[] operators = null, Row row = null, int clear = 2)
Changes cell values and operators in given Filter row. If row is null, modifies the first Filter row in grid.
cols is comma separated string or array of column ids or array of column objects to set their values and operators.
values is comma separated string or array of values to set to the cols cells.
operators is comma separated string or array of filter operator numbers to set to the cols cells in Filter.
row can be also column filter object, therefore cols will be row ids.
If set clear, clears all other Filter operators in the row. For clear = 2 (default) clears also the other values if set ClearFilterOff and for 3 clears the other values always.
Grid method void

ClearFilters

(string part = null)
Clears all filters set for the part. If the part is null, clears all filters in grid.
Clears filters set in Filter row / column.
Grid method void

SetFilter

(string name, string filter = null, string part = "Body")
Sets custom filter to given part - it can contain more part ids comma separated string or as an array.
name is the filter identification for later changes.
filter is the filter JavaScript formula in string. It has the same syntax as JavaScript Formula.
If filters rows, it can use variables Grid, Row and column ids as the Row cell values, e.g. grid.SetFilter("F1","B>5&&C!='AB'").
If filters columns, it can use variables Grid and Col. The column cells can be read by "Grid.Get('xxx',Col)".
If the filter is null, it removes the filter name.
Grid method void

FilterRange

(string col, string filter = null, string type = null, string part = "Body")
Sets custom filter to given part - it can contain more part ids comma separated string or as an array.
col is column or row object that will be filtered.
filter is range value to filter the col by, e.g. "3~5;8;12~15" or "1/1/2000~1/1/2001" or "one;two;three".
If the filter is null, it removes the filter name (or #col).
type is value Type, it can be "String", "Date" or "Number". If not set, it is read from col.Type or is estimated from the filter.
name is the filter identification for later changes, if not set, the "#"+col.id is used.
Grid method void

ReFilter

(string part = null)
Filters given part again without changing the settings. part can be comma separated string or array of part ids.
If part is not set, filters all parts that has set custom filter, Search or are referred by some Filter row / column.
It can be run asynchrounsly when applied SyncRows.
Grid method bool

ShowFilterMenu

(Row row, Col col)
Shows filter menu with filter operators for given cell. Returns true for success or false on fail.
Actions

ShowFilterMenu

(int target = 0) OnClickFilter
Shows filter menu with filter operators for actual or focused cell.
API event void

OnFilterChanged

(Grid grid, Row / Col / string filter)
Called after given filter has been changed, but before re-filtering the grid.
filter can be row or column Filter object or name of custom filter or "#Search" for search.
API event bool

OnFilter

(Grid grid, string part)
Called before filtering given part. Return true to cancel the filter.
It is not possible to change filter settings here.
API event void

OnFiltered

(Grid grid, string part)
Called after filtering given part is done.
API event bool

OnTestFilter

(Grid grid, Row / Col item, bool ok)
Called during filtering for every row or column item being filtered.
ok is the filter result for the item, (1 = show, 0 = hide).
Return 1 or 0 as new ok value for the item or null to continue without change.

Filter settings

Cell int

NoFilterRow

GetAttr SetAttr
If set, the row is excluded from filter when filtering by this cell.
0 - the filter is processed normally.
1 - the cell always fulfills the filter condition.
2 - the cell never fulfills the filter condition, the row can be shown by FilterTree.
It is not tested in custom filters set by SetFilter, there must be tested explicitly.
Cell int

NoFilterCol

GetAttr SetAttr
If set, the column is excluded from filter when filtering by this cell.
0 - the filter is processed normally.
1 - the cell always fulfills the filter condition.
2 - the cell never fulfills the filter condition, the column can be shown by FilterTree.
It is not tested in custom filters set by SetFilter, there must be tested explicitly.
Cell any

FilterValue

GetAttr SetAttr
Value used instead of cell value for filtering and searching.
Cell string[]

FilterD

GetAttr SetAttr
List of ids of default rows or default columns. Only rows / column that's D is listed here are affected by this Filter cell. Other rows / column always fulfill the filter condition.
FilterD is tested after NoFilterRow / NoFilterCol.
Cell string[]

FilterDList

GetAttr SetAttr
List of ids of default rows or default columns. It contains available items for the FilterD.
It can be first characted separated string or array of strings or array of menu item objects with Value and Text attributes.
This list is added into the Filter operators menu to choose the values for FilterD.
The added list is controlled by default menu "FilterDList".
Cell bool

FilterBlock

GetAttr SetAttr
How to filter rows (columns) in Block by this Filter cell.
0 - Ignore blocks. Shows only rows (columns) that fulfill the condition, regardless on their Block.
1 - First in block. The row (column) fulfills condition in this cell if the first row (column) in its Block that has not set NoFilterRow / NoFilterCol and has acceptable D for FilterD fulfills the condition.
Row, Col int

FilterAction

[1] GetAttr SetFilterAction
If the filtering by this Filter row / column is permitted and how the individual cells filters are merged together.
0 - off - the filter is not applied
1 - AND - all filters must be fulfilled to show the row / column
2 - OR - at least one filter must be fulfilled to show the row / column.
Cfg, Part int

FilterAction

[1] GetCfgAttr / GetPartAttr SetCfgAttr / SetPartAttr + ReFilter
If the filtering by Filter rows / columns and Search is permitted and how the individual rows / columns filters are merged together.
0 - off - no filter / search is applied
1 - AND (rows/cols) + AND (cells) - all filters must be fulfilled to show the row / column
2 - OR (rows/cols) + OR (cells) - at least one filter must be fulfilled to show the row / column.
3 - OR (rows/cols) + AND (cells) - at least one Filter / Search, but all its cell filters must be fulfilled to show the row / column.
4 - AND (rows/cols) + OR (cells) - all Filter / Search filters, but at least one their cell filter must be fulfilled to show the row / column
The application for Filter cells is done only if their FilterAction is not set.
Cfg, Part int

FilterActionCustom

[1] GetCfgAttr / GetPartAttr SetCfgAttr / SetPartAttr + ReFilter
If the filtering by custom filters is permitted and how they are merged together and with Filter rows / columns and Search.
0 - off - ignores all custom filters.
1 - AND
2 - OR
3 - uses FilterAction (0 = off, 1/4 = AND, 2/3 = OR).
4 - uses FilterAction (0 = off, 1/2/34 = AND).
5 - uses FilterAction (0 = off, 1/2/34 = OR).
Cfg int

FilterTree

[0] GetCfgAttr SetCfgAttr
How to filter rows (columns) in tree.
0 - Show only found. Shows only rows that fulfill the condition, regardless on tree.
1 - Show only found, with all children. If some row fulfills the condition, all its children are shown too and not iterated.
2 - Show all found. If some row fulfills the condition, all its parents are shown too.
3 - Show all found, with all children. If some row fulfills the condition, all its parents and all its children are shown too. The children are not iterated.
4 - Hide all not found. If some row does not fulfill the condition, it hides all its children and does not iterate them.
5 - Hide all not found, with all children. If row does not fulfill the condition, it hides all its children. If row fulfills the condition, it shows all its children. The children are not iterated.
Cfg bits

ColorFilter

[0] GetCfgAttr SetCfgAttr
If colors or marks the filtered rows / columns in FilterTree.
1. bit &1 - if set to 1, colors or marks rows / columns that fulfill the filter - marks only rows / columns for that the filter is applied.
2. bit &2 - if set to 2, colors or marks also all other rows / columns that fulfill the filter, iterates also the children for FilterTree = 1, 3, 5.
The items are colored or marked according to MarkRows / MarkCols.
Cfg char

FilterReplaceOne

["?"] GetCfgAttr SetCfgAttr
Wildcard character to specify one any character. Used when filtering strings by operators 1, 2 and 7 - 12.
For example "a??d" finds "abcd" or "aa d", but not "abd" or "abced".
Cfg char

FilterReplaceMore

["*"] GetCfgAttr SetCfgAttr
Wildcard character to specify none, one or more any characters. Used when filtering strings by operators 1, 2 and 7 - 12.
For example "a*d" finds "abcd", "abd", "ad" or "abce d".
Cfg bits

FilterIgnoreEmpty

[0] GetCfgAttr SetCfgAttr
If the empty cells will be ignored by some filter operators. Bit array.
The setting is not applied when comparing / searching empty string.
1. bit &1Never shows empty numbers for operators <, <=, >, >=.
2. bit &2Never shows empty strings for operators <, <=, >, >=.
3. bit &4Never shows empty strings for operators not contain / not begin / not end
4. bit &8Never shows empty numbers for operator not equal
5. bit &16Never shows empty strings for operator not equal
If set to negative value, it is not used, but can be turned on by FilterMenu.
Cfg string[]

FilterMenu

GetCfgAttr SetCfgAttr
Comma separated string or array of items shown in Filter menu. Set it to "" to not show the menu. It can contain "-" item as separator. Case sensitive. It can contain these keywords:

Clear action item, clears all filters,
Locale (FilterLocaleCompare, ignore diacritics, switches only between 0 / 2 values),
White (FilterWhiteChars, ignore white space),
Case (FilterCaseSensitive, turn on case sensitive search),
Tree (FilterTree, controls filtering in tree),
Color (ColorFilter, colors the found rows),
Empty (FilterIgnoreEmpty, restricts showing empty values by particular filter operators),
ClearOff (ClearFilterOff, clears the filter cell value when choosed filter off operator).
Cell int

Range

GetAttr SetAttr
1 - filtering single values if listed or are in range in the filter.
Set it to 1 to permit the Filter to contain more values or value ranges.
The filtered cells values must be single values and not ranges.
The 1 (Equal) / 2 (Not equal) filter operators compare the filtered value with all values in the filter and in numbers and dates also in the filter ranges.
The 2 - 6 compare filter operators for filtered ranges just compare strings as they are, so they have not much sense here.
The 7 - 12 string filter operators search also all the listed filter values and the filter is fulfilled if any of the listed value is found.

2 - filtering range values if contain one or all listed values in the filter.
Set it to 2 to permit filtering range values. The filter value and filtered values can contain more values, but not value ranges. (e.g. "one;three;five" but not "1~5;7~8")
The 1 (Equal) - The filter is fulfilled if the value contains one or more values from filter list.
The 2 (Not equal) - The filter is fulfilled if the value does not contain any value from filter list.
The 13 (Equal all) - The filter is fulfilled if the value contains all values from filter list.
The 14 (Not equal all) - The filter is fulfilled if the value does not contain at least one value from filter list.
Cell bool

FilterRaw

GetAttr SetAttr
If set to filter cell, filters in this column (row) by raw cell unformatted value and ignores List.
Cell any

FilterMenu

[...] GetAttr SetAttr
Menu displayed on click to the Filter operator icon.
It can be comma separated string or array of Filter operator numbers 0 - 14, to specify the shown operators and their order.
Or it can be full Menu object definition to display it instead of standard filter operators menu.
Grid method void

SetFilterAction

(int action, object item = null, bool clear = 0)
Sets FilterAction of the grid (item = null) or part (item = string) or row / column (item = object) to action and refilters grid.
If set clear and item is row or column, it sets row/column FilterAction to null if it is the same as global FilterAction.
It can be run asynchrounsly when applied SyncRows.
Grid method void

HasFilterAction

( )
Returns true, if there is only one Filter row or column and it has set FilterAction. Used to distinguish if the toolbar FilterAction should have two or three states.

Comparing strings

Cfg bool

FilterCaseSensitive

[0] GetCfgAttr SetCfgAttr
If the strings in filter are compared as case sensitive. Used only if the row, column, cell has not set the CaseSensitive attribute.
Row, Col, Cell bool

CaseSensitive

[0] GetAttr SetAttr
If the strings are compared as case sensitive.
For sorting and grouping it can be set only to row or column, for filtering it can be set also to filter cell and for generated List by *Rows / *Cols also to the cell with the List.
Cfg any

FilterLocaleCompare

[0] GetCfgAttr SetCfgAttr
If set, compares strings in filter according to locale meaning. Used only if the row, column, cell has not set the LocaleCompare attribute.
0a<b<áaccording to unicode
1a<á<baccording to default locale
2a==á<baccording to default locale
"locale"a<á<baccording to specified locale (e.g. "en-US" or "cs-CZ")
"=locale"a==á<baccording to specified locale (e.g. "=en-US" or "=cs-CZ")
Row, Col, Cell any

LocaleCompare

[0] GetAttr SetAttr
If set, compares strings according to locale meaning.
0a<b<áaccording to unicode
1a<á<baccording to default locale
2a==á<baccording to default locale
"locale"a<á<baccording to specified locale (e.g. "en-US" or "cs-CZ")
"=locale"a==á<baccording to specified locale (e.g. "=en-US" or "=cs-CZ")
For sorting and grouping it can be set only to row or column, for filtering it can be set also to filter cell and for generated List by *Rows / *Cols also to the cell with the List.
Cfg string

FilterWhiteChars

["- "] GetCfgAttr SetCfgAttr
List of characters to ignore when comparing strings for filter. Used only if the row, column, cell has not set the WhiteChars attribute.
It can be set for example to " " (space) to ignore spaces (it means that for example "a b c" and "abc" strings are the same.
If starts by "-", it is ignored, but can be turned on in FilterMenu.
Row, Col, Cell string

WhiteChars

GetAttr SetAttr
List of characters to ignore when comparing strings.
It can be set for example to " " (space) to ignore spaces (it means that for example "a b c" and "abc" strings are the same.
For sorting and grouping it can be set only to row or column, for filtering it can be set also to filter cell and for generated List by *Rows / *Cols also to the cell with the List.
Row, Col, Cell string[*]

CharCodes

GetAttr SetAttr
It changes characters in comparing strings.
It is first character separated array of pair of characters to replace the first character by the second one when comparing strings.
For example "|y|i|Y|I|.|," - replaces 'y' by 'i', 'Y' by 'I' and '.' by ',' - it means that when comparing strings does not differ between letter 'y' and 'i', both cases and also does not differ between comma and point.
The first character must be one letter, but the second in fact can be any letter or string or even empty string, like "|a|xxx|b||c|ff".
For sorting and grouping it can be set only to row or column, for filtering it can be set also to filter cell and for generated List by *Rows / *Cols also to the cell with the List.
Row, Col, Cell bool

RemoveHtml

GetAttr SetAttr
If set, removes all HTML code when comparing strings during sorting, grouping and filtering.
For sorting and grouping it can be set only to row or column, for filtering it can be set also to filter cell and for generated List by *Rows / *Cols also to the cell with the List.