News in version
TreeGrid Gantt chart SpreadSheet Examples Documentation Download Development Licensing Prices References Contacts Buy Try it free
Documentation
Search in documentation
TreeGrid versions compatibility

Changes log (txt file) Using custom CSS from 13.3 to 14.0 Upgrading from 9.3 to 10.0 Upgrading from 5.9 to 6.0

Using in JavaScript frameworks

Angular React Vue Other frameworks NodeJS server

Creating grid

Simple examples Basic information Creating grid Deleting grid Reloading grid Rendering grid Accessing grid by API

Data & communication
Data communication with server

Communication types AJAX communication AJAX SOAP envelope Submit communication Directly included data Data from JavaScript Cross domain / local load by JSONP Sessions (AJAX) Server response (AJAX) Synchronous communication (AJAX) Caching (AJAX) API (AJAX)

Download data

Settings for data download Layout XML structure Data XML structure

Upload data

Settings for data upload API for upload XML structure sent to server

Changing data from server

XML structure of download changes XML structure of request for a cell Synchronizing data with server

Input / output data formats

Complete list of tags Internal XML format Short XML format Extra short XML format DTD XML format JSON format

Cells
Cell basics

Cell type Cell format Dynamic format Dynamic type Cell value Reading / writing attributes by API Cell HTML Cell default Range or more values in one cell Cell with link URL Cell hint Cell tooltip / title Cell popup menu

Cell editing and changing values

Cell editability Dynamic editing Locking Defaults list Suggest list (auto complete) Tags input Changing cell value Mass cell change Clearing cells Editing cells Controlling <input> tag by JavaScript Input validation and restrictions Side checkbox Cell selecting

Calculations - cell formulas

Basics Formulas Mathematical functions Aggregate functions Special functions for actions Custom functions

Calculations - editable cell formulas

Basics Suggest list (auto complete) Defined names Actions for choosing cells 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 Custom functions

Cell side buttons

Introduction Right side Button Left side Icon

Cell spanning

Column span Row span Dynamic spanning

Cell style and color

Basic grid style Sizing and scaling - responsive design Dynamic cell style attributes Cell CSS class Cell background color Dynamic cell border Cell HTML style Row color alteration Cell mouse cursor

Editable cell images

Insert image Edit image

Cell types
Automatic type - Auto String - Text, Lines & Pass
Number - Int & Float

Format Localization

Date and time - Date

Format Calendar component Dates dialog Localization

List & combo - Enum & Radio

Introduction Definition Related lists Enum specific Radio specific

Checkbox - Bool
Action button - Button

Introduction Basic clickable button Switch button Radio / tab button Menu button Combo switch button Combo radio / tab button Special Space rows with buttons

Panel with more buttons - Panel

Definition Standard fast panel Custom panel

HTML and special types

Html type EHtml type (editable) Icon type Abs type List type Editable Link type Editable Img type DropCols type Upload File type

Columns

Column basics Column index Column visibility Column visibility menu Column selecting Column tree Auto column tree Column position and moving Column adding and copying Column deleting Column width Column API

Rows
Row basics

Rows by functionality Rows by position Row name Row id Row index

Default rows

Description Example of default rows Example of changing default row Attributes

Row tree

Tree attributes Actions & API for expand / collapse

Row identification

Setting row id attribute Row id attribute in tree Row id created from cell values API for row ids

Row visibility
Row adding and copying

Five ways of adding rows to grid Adding and copying restrictions Adding new empty rows Copying existing rows

Row deleting Row moving and dragging Row selecting Row height Row API Space rows
Features
Sorting rows

Sort settings Controlling sort position Comparing strings Sorting actions Sorting API

Grouping rows to tree

Group settings Creating groups Comparing strings Created group rows <D Group='1'/> User interface to choose grouping Grouping actions and API

Filtering rows

Filter settings Comparing strings User interface to choose filter Filter actions and API

Searching in rows and cells

Search settings User interface for search Search actions and API

Printing grid

Print settings Choosing items to print Page size Print API

Print / export to PDF

Introduction Client side settings Printing options Client side API Server side API Data sent from client to server

Export to Excel or CSV

Introduction and export types Basic settings Styling export XLSX export Gantt export CSV export Old XLS / XHTML export Export API Communication with server Client export Server export

Import from Excel

Basic settings Sheets manipulation

Copy & paste rows via clipboard

Copy & paste permissions Copying to clipboard Pasting from clipboard

Master - detail grids

Introduction External master - detail grids Nested master - detail grids Synchronizing grids Other attributes for master - detail

Pivot tables

Pivot attributes & API Pivot formulas

External objects (like Adobe Flash) Undo & Redo
Gantt and bar chart
Gantt objects

Gantt objects list Display settings Edit settings

Main bar

Definition of main bar and plans Main bar as Task Edit settings Main bar content and side html Tip on mouse hover Vertical position and height Style specific attributes API to manipulate Main bars Actions Side text (deprecated) Real Flow (deprecated)

Run bar

GanttRun Definition Extended definition Run bar as Task Edit settings Save format Selecting Run boxes Run box content and side html Tip on mouse hover Box identification Vertical position and height Style specific attributes Overlaid (Error) boxes Containers for more boxes Dragging - moving and resizing API to manipulate Run boxes Actions Run special formulas

Summary task

Main for Main Main for Run Editable Main Editable Run

Gantt icons - Flag & Point

Flag - icon with text Point - math points

Gantt display objects

Header - column captions Cell and column Background Vertical movable Line Mark & Progress line

Gantt zoom

Zoom options Chart size limits Zoom selection Paging in Gantt chart

Dependency, constraints & schedule

Introduction Data units Defining dependencies Dependency colors and shapes Changing dependencies Correcting dependencies Scheduling algorithm Project date constraints Task date constraints Critical path - Slack (Float)

Gantt calendars

Global base calendar Local calendar Calendar list Calendars dialog Other settings

Gantt resources

Resources list Resources assign Resources filter Resources calculations Availability chart Resource usage chart Generated resource usage chart

Gantt popup menu Gantt API
Line and XY points charts

Charts in grid cells Chart JSON definition Base chart settings Basic attributes Size Axis and caption Individual chart lines Data sources Visual settings API for standalone usage

Paging in large grids
Paging root rows

Paging types and attributes Auto adding root pages API for paging

Pager components

Side pager Side pager type Pages Side pager type Gantt Side pager type Custom Pager with navigation buttons & edit Pager as list of page indexes

Paging in tree

ChildPaging - load / render on expand MaxChildren - limit children count ChildParts - load / render on scroll

Paging columns

Paging types and attributes Auto adding column pages API for column paging

Server paging

Server paging for root rows Server communication in root paging Root paging in very large tables Server paging in tree Server communication in tree paging XML Request for Data in root paging XML Download Data in root paging XML Request for root Page / children XML Download root Page / children API for server paging

TreeGrid DLL/SO for server paging

Introduction Compatibility with TreeGrid control Using TreeGrid server DLL/SO ASP.NET C# ASP.NET VB PHP JSP Java TreeGrid server concepts Function reference Calculations

JSON menus and dialogs
JSON menu description JSON menu definition example
Menu settings

Base attributes Visual settings Key navigation Behavior Size and scroll

Menu item settings

Base attributes Clickable item Inactive caption Collapsible sub level Popup sub menu Columns Bool item Enum item Edit item

Custom menu in JavaScript

Show custom menu Custom menu position Custom menu advanced settings Custom menu JavaScript events Custom menu JavaScript methods

Calendar dialog Custom calendar & JavaScript events Custom dialog in JavaScript
Global grid settings
Grid size and scroll

Default behavior Maximize grid height and width Update size according to the content Let a user to control the grid size Widths of individual sections Other scrolling attributes and API

Media rules - responsive design
Languages

Language & regional setup (Text.xml) Translate texts dynamically Change language

Grid cursor - Focus & hover

Focused cell and row Focused cell range Move and copy focused cells Filling cell values by dragging Tabulator navigation Key navigation Cursor look - focus & hover

Selecting rows, cells and columns

Selecting base Selecting rows Selecting cells Selecting columns

Global settings

Status messages Configuration menus Configuration menu - options Configuration menu - columns Configuration menu - print / PDF Configuration menu - export Default toolbar Useful API function Help file

Animations

Animations base Row animations Column animations Cell animations Animations for undo / redo Animations for server side changes Dialog animations

Grid configuration in cookies
Mouse & key events & actions

List of event handler types TreeGrid mouse events Mouse event names Key and mouse button prefixes Touch event names Event targets Assigning event actions / callbacks Event action parameters Action name suffix Calling actions from JavaScript Creating custom actions Focused vs. Actual cell TreeGrid key events JavaScript API events

Mouse API event TreeGrid files
Debugging and testing

Debug window Automated testing

Search and advanced filter

TreeGrid documentation

Search provides advanced searching and filtering in grid cells and rows.
It can provide Search like Google or Search by JavaScript expression, see <Cfg SearchMethod/>
The found results can be filtered, selected, colored or focused, see <Cfg SearchAction/>
The search can be case sensitive or insensitive, see <Cfg SearchCaseSenstive/>.
The search can be run according to individual cells or whole rows, see <Cfg SearchCells/>.

Search criteria can be changed by a user in special Search row.
Search criteria can be preset in XML by <Cfg SearchExpression SearchAction/>
Search can be run by API method SearchRows
<Cfg> bool

Searching

[1]
If searching in grid is permitted.
<Cfg> bool

Searched

[1] Saved to cookies, to not load it, set SearchedLap='1'
If searching is enabled by user.
A user can enable / disable searching by click to Search row left panel.
upd 7.0 <Cfg> string

SearchExpression

Saved to cookies, to not load it, set SearchLap='1'
Expression to search or advanced filter expression.
The expression syntax depends on SearchMethod used. By default is the method chosen automatically according to expression syntax, see SearchMethod.
1 - Search like Google - expression has similar syntax to searching at www.google.com.
word wordwords separated by space - finds all cells or rows containing all the words
"Phrase with spaces in double quotes"quoted words are searched together as whole phrase
-wordword or phrase with hyphen prefix - finds all cells or rows without this word or sentence
word OR wordwords or phrases joined by OR (uppercase only) - finds all cells or rows containing at least one of them
#finds all empty cells
Example: London Paris OR Nice "above sea level"

2 - Search by expression – expression has similar syntax to TreeGrid formulas and JavaScript code, but it is not in TCalc content, so it cannot use TreeGrid calculation functions like sum().
The expression has the JavaScript syntax, operators (==, !=, <, <=, >, >=, &&, ||, !, parenthesis, function calls), if fact it can contain nearly every JavaScript code.
(Since 7.0) Due security reasons it is not possible to do function calls except methods of Math object and functions parseInt, parseFloat, escape, unescape, isFinite, isNaN.
Cell values from the row are referenced by column captions (not names!);
these names can be predefined by column SearchNames attribute, especially if the column caption contains spaces.
The column captions are referenced case insensitive.
String constants can be in double or single quotes or can be without quotes at all.
Not quoted strings must not interfere with column captions and other reserved words
To input dates in special format set it in SearchDateFormat.
For comparing equality can be used both '==' and '=' operators. For comparing inequality can be used both operators "!=" and "<>"
For operators "&&", "||" and "!" can be used word (case insensitive) equivalents, defined in Text.xml, in <Lang><Text And='' Or='' Not=''/></Lang>
By default can be used instead of "&&" => "and", "||" => "or", "!" => "not"
Remember, the operator && / and have higher priority then || / or
Here can be used special string operators to check if one string contains another string, starts with the string, ends with the string.
The operator names are defined in Text.xml, in <Lang><Text Starts='' Ends='' Contains=''/></Lang>
By default is Contains="contains,has" Starts="starts,starts with,starts by,begins,begins with,begins by" Ends="ends,ends by, ends with"
Example: (Name starts James or Name = John) and Age >20 and Age <40

3 - Exact string search - (new 6.3) expression has no special syntax, the string is searched for as is without any parsing.
The search is done also in number types as string search.
upd 12.0 <Cfg> string

SearchAction

Saved to cookies, to not load it, set SearchLap='1'
Name of search action predefined or currently applied in grid, can be one of Filter, Select, Mark, Find, FindPrev or empty. (Since 7.0) It can contain also more actions separated by comma or semicolon to do all these action in this order, e.g. "Filter,Mark" to show only found rows and mark the found cells.

FilterHides all rows that don't match the SearchExpression in method and other search options set.
The filter works in the same way as filter by <Filter>.
You can control the filter also by filter attribute like <Cfg StandardFilter /> and <I CanFilter />.
If row cannot be searched through or filtered by its settings, it is not hidden.
 
SelectSelects all rows that match the SearchExpression in method and other search options set.
Selects only whole rows, cannot select only cells.
If row cannot be searched through it is not selected.
Which rows will be iterated is affected also by ClearSelected.
 
MarkColors all rows or cells (see SearchCells) that match the SearchExpression in method and other search options set.
The rows or cells are colored by the CSS Found colors.
After change some search setting like SearchExpression and do Mark action again, new color for coloring is used (Found1->Found2->...)
The color is restored to Found1 after any other search action is done (Filter,Select,Find,FindPrev,Clear)
If row or cell cannot be searched through it is not colored.
 
FindFocuses the first row or cell that matches the SearchExpression in method and other search options set.
By default searches from the next row / cell from actually focused (like Find next), for other possibilities see SearchFocused.
If row or cell cannot be searched through, it is not focused.
 
FindPrev(new 12.0) Focuses the last row or cell that matches the SearchExpression in method and other search options set.
By default searches from the previous row / cell from actually focused (like Find previous), for other possibilities see SearchFocused.
If row or cell cannot be searched through, it is not focused.
upd 7.0 <Cfg> int

SearchMethod

[0] Saved to cookies, to not load it, set SearchLap='1'
Method of the search
0 - Automatic method selection - automatically chooses 1 or 2 method according to used expression
2 (expression search) is chosen if the expression contains one of these characters ( ) = ! < >
or if the expression contains at least two column names or one column name and one keyword of these: contains, ends, starts
otherwise is chosen 1 (Search like Google)
1 - Search like Google
2 - Search by expression (since 7.0 it removes all function calls to be safe)
3 - Exact string search (new 6.3). It is not automatically chosen by Method=0.
4 - Search by expression unsafe (new 7.0). Like 2, but does not remove function calls and doesn't add quotes for strings.
renamed 6.0 <Cfg> bool

SearchCells

[0] Saved to cookies, to not load it, set SearchLap='1'
Used only for SearchMethod = 1 (Search like Google) and 3 (Exact search).

0searches in rows, thus all the cells in one row together must fulfill the SearchExpression.
For example if you search "London 1000" at least one cell in row must contain "London" and other (or the same) the "1000".
For Filter or Select action the row is filtered (visible) or selected if it fulfills the SearchExpression.
For Mark action the whole row is colored.
For Find or FindPrev action the whole found row is focused (does not change focused column), for next match it continues in next row.

1searches in cells, thus every cell to find must fulfill the SearchExpression.
For example if you search "London 1000" the found cell must contain both "London" and "1000".
For Filter or Select action the row is filtered (visible) or selected if at least one cell is found.
For Mark action only the found cell is colored.
For Find or FindPrev action focuses the first cell found, for next match continues in the same row in next cell.
renamed 6.0 <Cfg> bool

SearchCaseSensitive

[0] Saved to cookies, to not load it, set SearchLap='1'
If strings are compared case sensitive.
new 7.0 <Cfg> string

SearchWhiteChars

List of characters to ignore when searching.
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.
new 7.0 <Cfg> string[*]

SearchCharCodes

It changes characters in comparing strings for searching.
It is first character separated array of pair of characters to replace the first character by the second 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"
new 7.0 <Cfg> int

SearchNumbers

[1/0]
How numbers are compared (cell types Int and Float). Used only for SearchMethod = 1 (Search like Google) and 3 (Exact search).
Default value is 1 for SearchMethod = 1 and 0 for SearchMethod = 3.
0 - as strings, e.g. -1.7 is found by -1.7 or 1.7 or -1 or 1or 7 and so on, similar to SearchMethod=3
1 - exactly, e.g. -1.7 is found only by -1.7
2 - rounded, e.g. -1.7 is found by -1.7 or -2
3 - floor, e.g. -1.7 is found by -1.7 or -1 or 1 (but 1.7 is not found by -1 or 1.6)
<Cfg> string[ ]

SearchDefs

Saved to cookies, to not load it, set SearchLap='1'
Comma or semicolon separated list of default row names. Only row with the Def attribute that is listed will be searched through.
The row with not listed Def will be: a) for Filter action never hidden, b) for other actions never found / colored / selected
If SearchDefs is empty, all rows will be searched through.
<Cfg> string[ ]

SearchCols

Saved to cookies, to not load it, set SearchLap='1'
Columns names (not captions!), comma or semicolon separated.
Only cells in given columns will be searched through. Used only for SearchMethod = 1 (Search like Google) and 3 (Exact search).
If SearchCols is empty, all cells will be searched through.
Result depends also on SearchHidden. If column has CanSearch='0', it cannot be searched through at all.
renamed 6.0 <Cfg> bool

SearchHidden

[0]
For 1 and any action it searches also in hidden columns. Used only for SearchMethod = 1 (Search like Google) and 3 (Exact search).
renamed 6.0 <Cfg> bool

SearchExpand

[1]
For 1 and action Select or Mark it expands parents of the found row to be visible in tree.
renamed 6.0 <Cfg> int

SearchFocused

[3]
Only for Find and FindPrev actions 0 - Searches from beginning
1 - Searches from focused cell, when reaches end, ends
2 - Searches from focused cell, when reaches end, continues from beginning
3 - Searches from focused cell, when reaches end, it asks user to continue from beginning
renamed 6.0 upd 7.0 <Cfg> int

SearchNotFound

[500]
If set and action is Find or FindPrev, alerts message "Not found" if no result is found.
If set to 1, it alerts the message by standard alert.
If set to 2, it alerts the message by HTML dialog with ok button
If set to >=10, it alerts the message by HTML dialog for given count of milliseconds.
new 7.0 <Cfg> int

SearchAlertFound

If set and action is Filter, Select or Mark, alerts message with count of row / cells found.
If set to 1, it alerts the message by standard alert.
If set to 2, it alerts the message by HTML dialog with ok button.
If set to >=10, it alerts the message by HTML dialog for given count of milliseconds.
You can use also SearchCount variable to display the found count in some cell formula.
new 6.0 <Cfg> bool

SearchClass

[0]
If set to 1, found cells (Mark action) can be highlighted also by CSS class attributes like color or font, defined in GxColorFoundX CSS class in Grid.css.
If set to 0, found cells are highlighted only by background color.
The value 1 can slow down selecting cells.
new 7.0 <Cfg> int

SearchMaxMark

[3]
How many different Mark colors are permitted in grid.
Set it to 1 to clear mark for every new search.
<Cfg> string

SearchDateFormat

Format to convert strings to date when used in advanced filtering (SearchMethod=2).
<C> string[ ]

SearchNames

Comma separated strings as possible names of the column
Used in SearchExpression to reference this column instead of its caption, one column can have more names to be referenced by.
Used only for SearchMethod = 2 (Search by expression).
<C> bool

CanSearch

[1]
If values are searched within this column. Used only for SearchMethod = 1 (Search like Google) and 3 (Exact search).
The columns can be also restricted by SearchCols and SearchHidden.
new 8.0 <C> bool

SearchText

[0]
Used only for SearchMethod = 2 (Search by Expression).
For 0 compares the cell raw value, for 1 compares the cell formatted string (for Enum compares with values from Enum array).
chg 7.0 <cell> string

FilterValue

Cell value used for filtering and searching, useful for special non editable cells like Html, Icon, Abs, Gantt, ..., see also OnGetFilterValue event.
(Deleted in 7.0) For searching it is not used for Int and Float types and also not for SearchMethod = 2.
It is also used by FilterTextRange and FilterDateRange methods, but not by SetFilter method.
API event type

OnGetFilterValue

(TGrid grid, TRow row, string col, type val)
Called to get cell value for filtering and searching.
val is predefined value, returns val or new value.
new 7.0 API variable int

SearchCount

Count of found rows for action Select.
Count of marked cells or rows for action Mark.
For action Filter it is empty string, to get the result use FilterCount variable.
For no action or actions Find / FindPrev it is null.

User interface to choose search

User interface for search is shown by solid space <Search> row. <Solid><Search ... /></Solid>
This row is not divided to any section and is never scrolled. It can contain any cells like Space row, but the cells named as listed below have special functions.
To more customize searching and advanced filters in grid you can define all the user interface by Space row cells instead of Search. See this tutorial.
It can be placed in <Solid> tag. The position in grid is set by its Space attribute.
upd 7.0 <Search> string[ ]

Cells

["Expression"]
The Search row can have these predefined cells, the cells can have standard cell and space row cell attributes, like Width or Tip.
Expression The expression to search for or advanced filter formula, standard input cell type Text. Its Action attribute can have special values.
Filter, Select, Mark, Find, FindPrev (new 12.0), Clear, Help Buttons to do standard search action. Clear restores original state, Help shows help message.
ActionsSelect box with standard search actions to select one that will be run by Search button or after Expression changes and its action is set to Actions.
Its Action attribute can have special value "Refresh" to repeat search in grid after another value is selected.
SearchButton to do search action selected by Actions combo, if not defined the cell Actions, just by Actions attribute.
Since 7.0 it can be used also to define more actions for Actions at once, like Actions="Filter,Mark" to filter the rows and mark the found cells.
ListSelect box with predefined values for SearchExpression. To let user just select predefined filter or search instead of building his own.
You have to set the cell Expressions and Defaults attributes.
ColsSelect box to select which columns will be searched through. If not present, all columns are searched.
You have to set Cols and Defaults attributes and optionally Label attribute.
DefsSelect box to select which rows (according to their Def attribute) will be searched through. If not present, all rows are searched.
You have to set Cols and Defaults attributes and optionally Label attribute.
CaseCheck box to choose case sensitive (1) or case insensitive (0) search. Sets SearchCaseSensitive. Has optional attribute Label.
TypeCheck box to choose to search in rows (0) or in individual cells. Sets SearchCells. Has optional attribute Label.
<Search> string

ExpressionAction

["Filter"/...]
Search action done after the Expression cell value changed, can be Filter, Select, Mark, Find, FindPrev, Actions, Refresh or Last.
Use Actions value if cell Actions is included in Cells. Use Last to run the last action previously done. Use Refresh to redo the actual action.
Use empty string to not do any action.
Default value is Filter if no button and Actions cell is defined or Actions or the first button's action.
<Search> string

ActionsAction

["Refresh" / ""]
Search action done after the Actions select box is changed, can be Refresh or empty string.
Use Refresh - repeats search with the selected action.
The default value is Refresh if no Search cell is defined, otherwise empty string.
<Search> string[*]

ListDefaults

First character separated array of item names to display in List cell. The same as button type Defaults list.
<Search> string[*]

ListExpressions

First character separated array of predefined expressions that will be assigned to SearchExpression after specific item in ListDefaults will be selected.
<Search> string

ListAction

Search action done after the list item is chosen, can be Filter, Select, Mark, Find, FindPrev, Actions, Refresh or Last.
Use Actions value if cell Actions is included in Cells. Use Last to run the last action previously done. Use Refresh to redo the actual action.
Use empty string to not do any action.
<Search> string[*]

ColsDefaults

First character separated array of item names to display in Cols cell.
<Search> string[*]

ColsCols

First character separated array of column names that will be assigned to SearchCols after specific item in ColsDefaults will be selected.
It should contain actual SearchCols value to provide correct formula.
<Search> string[*]

DefsDefaults

First character separated array of item names to display in Defs cell.
<Search> string[*]

DefsDefs

First character separated array of default row names that will be assigned to SearchDefs after specific item in DefsDefaults will be selected.
<Search> int

Space

[1]
Position of the row in grid, specifies horizontal section of the grid.
If more solid rows has the same Space value, are placed in the order they are in data
-1 - above grid, 0 - above header, 1 - under head rows, 2 - above foot rows, 3 - under foot rows, 4 - under vertical scrollbar, 5 - under grid
-1, 0, 4, 5 are spanned for whole grid, including vertical scrollbar and pager, 1, 2, 3 are spanned only for columns.
<Search> int

Panel

[1]
If the row displays left side panel, to show icon for enabling / disabling searching.
If set to 1, the panel is displayed only if the grid left side panel is displayed.
If set to 2, the panel is displayed always.
<Search cell> string

Label

HTML label displayed in front of the cell. For example ColsLabel='Select columns:' adds the label in front of the cell Cols.
<Search cell> int

Left

Left indent of any cell, in pixels.

Search actions and API

<Actions>

SearchOn

Attached to event OnClickPanelSearched
Enables searching in grid and re-searches it according to actual settings. It fails if searching already enabled.
<Actions>

SearchOff

Attached to event OnClickPanelSearched
Disables searching in grid and clear search. It does not clear actual search settings. It fails if searching already disabled.
API event bool

OnSearch

(TGrid grid, string Action, bool Show)
Called when searching in grid starts after user action. Return true to suppress default searching.
Action can be Filter, Select, Mark, Find, FindPrev, Clear, Help, Refresh.
API event void

OnSearchFinish

(TGrid grid, string Action, bool Show)
Called after search in grid finished, all changes are already visible.
API event int

OnRowSearch

(TGrid grid, TRow row, string col, bool found, function func, type userdata)
Called when searching in row.
col is column cell when is searching if set searching in cells - SearchCells = 1, otherwise it is null
found is the search result.
It must return new found value. 1 - found, 0 - not found, -1 not applicable (it will not be selected but also not be hidden by filter)
If set col (searching in cells), the OnRowSearch can also return column name as the cell found.

func is caller function for searching row that resulted found. it has prototype func (TRow row, string col, type userdata)
func returns -1 if cannot search, 0 if not found or 1 if found when searching in row or column name if found when searching in cells
The func and userdata parameters can be used for searching in other rows than the actual. Remember from the func is called the OnRowSearch event
userdata is null in default call, use it to mark custom calling to avoid recursion cycle.
Example using func and userdata:
Grids.OnRowSearch = function (G,row,col,found,F,type){// This function searches in children to mark/unmark parent row
if(type) return found;// to avoid recursion cycle
if(!row.firstChild) return -1;// not applicable for children
for (var r=row.firstChild;r;r=r.nextSibling) if(F(r,col,1)>0) return 1;// Searches in children, if at least one found, parent is marked as found
return 0; }
API method void

SearchRows

(string action, bool noshow)
Calls DoSearch asynchronously, for server paging it reloads grid.
API method void

DoSearch

(string action, bool noshow)
Runs specified searching action in grid.
action can be standard search action "Filter", "Select", "Mark", "Find", "FindPrev" or can be
"Refresh" - runs actual action (SearchAction) again. "Clear" - clears actual action and restores original state. "Help" - shows help