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

Search in cells

FastGrid documentation

Search text in cell values or strings and focus or highlight them.
Search input and icon can be added to grid by "Search" toolbar.

Cfg string

SearchText

GetCfgAttr SetCfgAttr
String that will be searched by Search() function or on grid start.
It can be edited also by Search default toolbar cell.
If it contains more words separated by space, they can be searched together or separately according to SearchMulti. Maximum separate words to search is 32.
If set SearchText and SearchAction contains ColorCells / ColorRows, the found cells / rows are colored automatically on repaint without call Search().
Cfg flags

SearchAction

["Focus,ColorCells"] GetCfgAttr SetCfgAttr
Action(s) done on Search() or on paint or on grid start.
Search - if search is on. Must be set to do any search action.
Focus - focus cells, first forwards from start, next forwards from focus,
FocusNext - focus cells, forwards from focus,
FocusPrev - focus cells, backwards from focus,
ColorCells - color found cells, it searches the grid cells on paint,
ColorRows - color rows containing found cells, it searches the grid rows on paint,
SelectRows - select rows containing found cells,
FilterRows - filter (show only) rows containing found cells.
Cells - fills grid attribute FoundCells as two dimensional array of found cells as [row.id][col.id].
Rows - fills grid attribute FoundRows as array of found rows by their id.
Blocks - fills grid attribute FoundBlocks as array of found row blocks by their Block attribute.
Cfg int

SearchCompare

[11] GetCfgAttr SetCfgAttr
How the cell values are compared against SearchText. The Word search searches the SearchText string in every word of the cell value.
Number search:1 - Equal, 2 - Not equal, 3 - Less than, 4 - Less than or equal, 5 - Greater than, 6 - Greater than or equal
String search:7 - Begins with, 8 - Does not begin with, 9 - Ends with, 10 - Does not end with, 11 - Contains, 12 - Does not contain
Word search:13 - Any word begins with, 14 - No word begins with, 15 - Any word ends with, 16 - No word ends with, 17 - Any word equals to, 18 - No word equals to
Cfg int

SearchType

[2] GetCfgAttr SetCfgAttr
Cell value type to compare, 1 - raw not formatted value, 2 - value in edit format (default), 3 - value in display format (it also searches Number type as text).
Cfg int

SearchMulti

[0] GetCfgAttr SetCfgAttr
How to compare SearchText, if it contains more words space separated.
0 - no - the cell is found if the cell value contains the whole text as is,
1 - OR - the cell is found if the cell value contains any word from text,
2 - cell AND - the cell is found if the cell value contains all words from text,
3 - row AND - the row is found if every word from the text is found in some cell in the row, action "ColorCell" colors every the found cell, action "Focus" focuses every the found cell.
Cfg flags

SearchOptions

[""] GetCfgAttr SetCfgAttr
Various options to control the Search.
Index - if column with Index=1 can be searched and the row is found by its index, finds only this row on first search,
Repeat - does not show "Not found anything else" message and searches again,
FocusNext - if found cell cannot be focused, focuses next cell in the same row,
Wildcards - if SearchReplaceOne and SearchReplaceMore wildcards can be used for searching strings, can slightly slow down the search, ignores LocaleCompare,
ColorBlock - colors the whole row Block when coloring rows by SearchAction ColorRows.
EmptyOff - entering empty string to search cell will switch off the search.
NoGroup - will not search in columns used in group by.
Sync - sets Search() method as always synchronous and never show progress message.
Cfg bool

SearchCaseSensitive

[0] GetCfgAttr SetCfgAttr
If the strings in search are compared as case sensitive.
Cfg any

SearchLocaleCompare

[0] GetCfgAttr SetCfgAttr
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")
Cfg string

SearchWhiteChars

["- "] GetCfgAttr SetCfgAttr
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.
If starts by "-", it is ignored, but can be turned on in SearchMenu.
Cfg string[*]

SearchCharCodes

GetCfgAttr SetCfgAttr
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.
Cfg string

SearchFocusCol

GetCfgAttr SetCfgAttr
id of the column that will be focused when the row is found by search. If set, the search focused every found row only once.
If it starts by "-", it is not used for search, but still permits the option in search menu.
It can be set to more column ids comma separated, the first applicable column will be focused on find.
Cfg string[]

SearchRows

GetCfgAttr SetCfgAttr
Comma separated list or array of row ids their cells will be searched. The rows not listed here are always searched except if they have set NoSearch.
If the item starts by "-", it is marked as not chosen and its cells are not searched.
If there is item named "-", it represents all applicable rows as not chosen. If there is item named "*", it represents all applicable rows as chosen. For example "*,-Row3" chooses all rows except Row3.
Cfg string[]

SearchCols

GetCfgAttr SetCfgAttr
Comma separated list or array of column ids their cells will be searched. The columns not listed here are always searched except if they have set NoSearch.
If the item starts by "-", it is marked as not chosen and is not exported as not chosen columns according to Exporting.
If there is item named "-", it represents all applicable columns as not chosen. If there is item named "*", it represents all applicable columns as chosen. For example "*,-Col1" chooses all columns except Col1.
Cfg flags

SearchRowsType

[""] GetCfgAttr SetCfgAttr
Which rows are searched:
NoSearch - searches also in rows with NoSearch = 1.
Collapsed - searches also in collapsed children.
Hidden - searches also in manually hidden rows.
Filtered - searches also in filtered rows. If set filter by SearchAction&64, this flag is always set.
Deleted - searches also in deleted rows.
Cfg flags

SearchColsType

[""] GetCfgAttr SetCfgAttr
Which columns are searched:
NoSearch - searches also in columns with NoSearch = 1.
Collapsed - searches also in collapsed children.
Hidden - searches also in manually hidden columns.
Filtered - searches also in filtered columns and columns hidden by HideGroupCols.
Deleted - searches also in deleted columns.
Cfg string[]

SearchList

["|$SearchOff|$SearchClearHistory"] GetCfgAttr SetCfgAttr
First character separated string or array as list of predefined searches displayed on top in search history list.
It can contain also special items "$SearchOff" to turn off search and "$SearchEmpty" to search empty string.
Cfg string[]

SearchHistory

GetCfgAttr SetCfgAttr
First character separated string or array as list of history searches displayed below SearchList.
Cfg string

SearchWordSeparators

["\\b"] GetCfgAttr SetCfgAttr
Regex string for separating words for SearchCompare>=13. For example "\\b" separates by all Regex word separators, "\\s" separates by white characters, "[,;\\s]" separates by white characters and comma and semicolon.
Cfg char

SearchReplaceOne

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

SearchReplaceMore

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

MaxSearchHistory

[10] GetCfgAttr SetCfgAttr
Maximum last searched items stored in search history. If set to 0, the history is not included in the Search cell popup list.
Cfg int

MaxSearchTime

[1000] GetCfgAttr SetCfgAttr
If searching is taking more than this time in milliseconds, progress message is shown during searching.
If set to 0, the search is always synchronous and cannot be cancelled during long process.
Cfg string[]

SearchMenu

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

Focus (SearchAction contains Focus, focus cell search action choose),
ColorCells (SearchAction contains ColorCells, color cells search action),
ColorRows (SearchAction contains ColorRows, color rows search action),
SelectRows (SearchAction contains SelectRows, select rows search action),
FilterRows (SearchAction contains FilterRows, filter rows search action),
Compare (SearchCompare, choose search compare method),
Type (SearchType, choose search type 2 - edit format or 3 - display format),
Multi (SearchMulti, choose how to search more words),
Case (SearchCaseSensitive, turn on case sensitive search),
Locale (SearchLocaleCompare, ignore diacritics, switches only between 0 / 2 values),
White (SearchWhiteChars, ignore white space),
Index (SearchOptions contains Index, prefer row index search),
Repeat (SearchOptions contains Repeat, do not show message "Not found anything else"),
FocusCol (SearchFocusCol, focus whole rows, sets the attribute with "-" prefix).
Group (SearchOptions contains NoGroup, do not search in columns used for group by),
Layout (changes SearchRows and SearchCols attributes, chooses items from popup submenu).

To hide disabled items in the menu set: DefTools:{ Search:{ ListMenu:{ Script:{ HideDisabled:1 } } } } .
To show the menu in two columns set: DefTools:{ Search:{ ListMenu:{ Script:{ Columns:2 } } } } .
Part int

SearchAutoIgnore

GetPartAttr SetCfgAttr
If set, used instead of AutoRemove to get rows / columns to search in when the part adds rows / columns automatically by Auto.
Row, Col bool

NoSearch

[1/0] GetAttr SetAttr
If set, the row / column cannot be found by search. By default set to 1 in special rows / columns and to 0 in normal rows. Search never iterates toolbars.
Cell bool

NoSearch

GetAttr SetAttr
If set, the cell is not iterated by search. It is read only if not set FV&32.
Cell any

SearchValue

GetAttr SetAttr
If set, it is used for Search instead of the cell value. Ignored if set FV without &16.

Toolbar string

D

=

"Search"

Default toolbar to show SearchText box and Search icon.
Tool string

D

=

"SearchText"

Default toolbar cell to show edit box with text to search. Changing the text run the search. It can show popup list with search history and search off item.
It is, but need not be, placed to Search toolbar.
Tool string

D

=

"Search"

Default toolbar cell to show Search icon to run the search and to show search options defined by SearchMenu.
It is, but need not be, placed to Search toolbar.
Grid method bool

Search

(any text = null, string action = null, int compare = null, int type = null, int multi = null, bits options = null, Col / string focuscol = null, Row row = null, Col col = null)
Runs given search action in grid. For action containing only ColorCells / ColorRows just marks the grid for repaint.
If the parameter is null, it is read from appropriate grid attribute, if it is not null, its value is set to the appropriate grid attribute.
row and col can be used instead of actually focused cell to search from this cell by action focus.
If action is true, does not change focused cell, if it is found.
If action is false, clears the search, remove the "Search" from actual SearchAction.
API event bits

OnSearch

(Grid grid, Row row, Col col, any value, string type, string[] texts, number[] numbers, bits results)
Called on search in the cell value. value is the cell value to search in.
type is cell type "Number", "String", "Date", "Html" - for Auto type it returs the type according to the cell value and format.
texts is parsed SearchText to array of strings according to SearchMulti, for 0 it contains one item.
numbers is parsed SearchText to array of numbers according to SearchMulti, for 0 it contains one item. If the word cannot be converted to number, the item is null.
results are temporary results for SearchMulti = 3 in actual row. It has set apropriate bit for every found value in texts / numbers, &1 for found texts[0], &2 for texts[1], &4 for texts[2], ...
Return null to ignore the event and do the default search or 0 as not found or 1 as found.
If found in the cell and results is not null, return value containing bits of the found items from texts / numbers, similarly to bits in results.
Grid method object[]

GetSearchHistory

( )
Returns menu items for actual search history and predefined searches.