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

Languages

TreeGrid documentation

Language and regional settings (Text.xml)

All TreeGrid texts, messages, alerts and language dependent settings are stored in Text.xml.
You can translate this file to all languages you need and provide to visitors appropriate file according to their language settings.
Url to Text.xml is set by <treegrid/bdo Text_Url/>
In Text.xml are the attributes marked according to TreeGrid version in which were added.

The most of language settings is set in <Lang> tag, the rest in <Toolbar>, <Panel> and <Header>.

You can define or redefine any particular or even all settings outside the Text.xml in any other input XML, in appropriate tags.
For example to change text for deleting row set <Lang><Alert DelRow='Do you want to delete the row %d ?'/></Lang>
<Lang>

<Alert>

XML tag
All pure text settings. Used for standard alert and confirm dialogs.
If the particular text is set to empty string, the message is not shown and the confirm dialog returns true or false according to particular logic.
The message can contain some variable information like row or column name, count of rows and so on. This information replaces the %d or %1, %2, etc. string in the message.
If there are more variable information, they replace one by one the %d strings in the message.
What message can contain variable information you can see from its text in Text.xml.
<Lang>

<Text>

XML tag
All HTML texts in grid. Usually text of status messages displayed in grid.
If the particular text is set to empty string, the message is not shown.
The message can contain some variable information like row or column name, count of rows and so on. This information replaces the %d string in the message.
If there are more variable information, they replace one by one the %d or %1, %2, etc. strings in the message.
What message can contain variable information you can see from its text in Text.xml.
new 6.0 <Lang>

<Gantt>

XML tag
Gantt chart texts, the same syntax as <Text>.
new 12.0 <Lang>

<MenuCell>

XML tag
All action texts in cell popup menu.
If the particular text is set to empty string, the item is not shown.
The message can contain some variable information like row or column name, count of rows and so on. This information replaces the %d string in the message.
If there are more variable information, they replace one by one the %d or %1, %2, etc. strings in the message.
What message can contain variable information you can see from its text in Text.xml.
new 6.0 <Lang>

<MenuButtons>

XML tag
Popup dialog buttons, for menu and calendar. Pure texts.
new 6.0 deleted 12.0 <Lang>

<MenuCopy>

XML tag
All possible items in popup Copy / Add menu.
Replaced by <MenuCell>
<Lang>

<MenuCfg>

XML tag
All item names in options menu.
new 12.1 <Lang>

<MenuColumns>

XML tag
All item names in columns menu.
new 12.1 <Lang>

<MenuPrint>

XML tag
All item names in print menu.
new 12.1 <Lang>

<MenuExport>

XML tag
All item names in export menu.
<Lang>

<MenuFilter>

XML tag
All operator names in Filter operator menu.
<Lang>

<Format>

XML tag
All language settings for formatting date, time and numbers.
Contains predefined formats and item names (like day or month names).
Predefined formats are global for whole page, for all grids on one page.
For attribute description see Number localization and Date localization.
new 14.0 <I> bool

TextOnly

Used for defining some fixed row attributes in Text.xml to not affect the row position.
Define the row with TextOnly in Text.xml also with Visible='0' and in data or layout redefine the row with the same id and Visible='1'.
For example in Text.xml define the row text as:
<Solid><I id='MyRow' Visible='0' TextOnly='1' MyCol='MyTextToTranslate'/></Solid>
And in data or layout define the row normally with all attributes, like:
<Solid><I id='MyRow' Visible='1' Cells='MyCol' MyColWidth='100' ... /></Solid>
new 6.0 <Toolbar cell> string

Tip

Tooltip texts for all standard Toolbar buttons
new 6.0 <Panel> string

PanelxxxTip

xxx is name of Panel button like Select
Tooltip texts for all standard Panel buttons
new 6.0 renamed 12.0 <Header> string

PanelPanelxxxTip

xxx is name of Panel button like Select
Tooltip texts for all standard Panel buttons in header.
Since 12.0 it was renamed from PanelHeaderxxxTip.
API variable object

Lang

Actual language settings loaded from <Lang> tags.

Translate texts

Definitions of cell texts or text parts to be replaced by another string for given language.
The text is translated only for display. In data it still contains original values.
The texts are set / replaced in order they are defined and the language files loaded. Only the texts defined in one tag (including nested <U> tags) are replaced in order from the longest to the shortest.
new 14.0 <Grid>

<TextXX>

XML tag
Defines translations for language XX, where XX is the language Code.
new 14.0 <TextXX>

<T>

XML tag
Definition of one translate action. As shortcut the T can be replaced by the action name <T Action="Set" ... is the same as <Set ...
new 14.0 <T> string

Action

Action used for translation, case insensitive. It can be:
Set - set texts directly to the column values. The other attributes are defined as ColName="translated value". There is no Col attribute.
Change - replace the whole cell value by the text. The other attributes are defined as value_to_translate="translated value" or the child tag as <U N="value to translate" V="translated value"/>
Replace - replace the part of the text value by the text. Case sensitive, only the first occurrence. The other attributes are defined as value_part_to_translate="translated value part" or the child tag as <U N="value part to translate" V="translated value part"/>
Last - the same as Replace, but replaces the last occurrence instead of first one.
Regex - replace the part of the text value by RegEx by the text. Case insensitive, all occurrences (regex "gi"). The child tags are defined as <U N="regex to translate" V="translated value part"/>
Set and Change are fast, Replace and Regex are slower and should be used only if the Set and Change cannot be used.
Action can be set also directly to the tag name: <T Action="Set" ... is the same as <Set ...
Action can end with "Text" (SetText, ChangeText, ReplaceText, LastText, RegexText) to replace only text part in HTML value. Using Text suffix slows down the translation.
new 14.0 <T> string

Row

Row id to apply the translation to. If set, the Def, Kind and Space is ignored. It can be also comma separated list of more row ids.
The Row can be set also to the keyword:
- "MenuName" to change column caption in visibility menu,
- "SearchNames" to change column captions for search,
- "Header" to change pager caption (Col is set to the pager Name).
new 14.0 <T> string

Def

Row default name to apply the translation to. If set, the Kind and Space is ignored. It can be also comma separated list of more row default names.
new 14.0 <T> string

Kind

Row kind it to apply the translation to. If set, the Space is ignored. It can be also comma separated list of more row kinds.
new 14.0 <T> bool

Space

If set, the translation is applied to solid rows, otherwise it is applied to data or fixed rows.
new 14.0 upd 16.1 <T> string

Col

Column name to apply the translation to. If set, the Type is ignored. It can be also comma separated list of more columns.
The Col can be set also to the keyword:
- "MenuName" to change row name in visibility menu,
- "GanttXXXTip to change Gantt item tip before it is converted. To translate converted Gantt tip use Gantt column name plus "Tip" instead. The XXX can be empty (first main bar), number (other plan main bars), Milestone, Milestonenumber, Run, Dependency, Constraints, Points, Flags, Base, BaseAuto, Finish, FinishAuto, LineX, Line.
- "GanttXXXText to change Gantt item text before it is converted. To translate converted Gantt text use Gantt column name plus "Text" instead. The XXX can be empty (first main bar inside text), number (other plan main bars), Left (first main bar left side text), Leftnumber (other plan main bars), Right (first main bar right side text), Rightnumber (other plan main bars), Run (run inside text), RunLeft (run left side text), RunRight (run right side text), Mark (GanttMark text), Flags (GanttFlags text).

The Col can be set also to:
- column or cell name plus "Menu" to translate anything in column popup menu for given Row or all rows. If set only as Menu, it translates it in all columns's menus.
- since 16.1 "Choose..." action name plus "Menu" to translate the popup menu shown by the Choose... action.
- column or cell name plus "MenuHead" to translate head section in column popup menu for given Row or all rows. If set only as MenuHead, it translates it in all columns's menus.
- column or cell name plus "MenuFoot" to translate foot section in column popup menu for given Row or all rows. If set only as MenuFoot, it translates it in all columns's menus.
- column or cell name plus "FilterMenu" to translate anything in filter cell popup menu for given Row or all rows. If set only as FilterMenu, it translates it in all columns's menus.
- column or cell name plus "Edit" to change edited value - reversed translation from destination language to source language.
- column or cell name plus "Tip" to change cell tip, including all converted Tip in Gantt except drag tip,
- column or cell name plus "Fix" to change cell value with HtmlPrefix and HtmlPostfix,
- column name plus "DragTip" to change Gantt drag tip,
- column name plus "Text" to change any Gantt item text.
- cell name plus "Label" or "LabelRight" to change cell label in solid space row.
- pager Name to change Pager caption, the Row must be set to "Header".
new 14.0 <T> string

Type

Column type to apply the translation to. It can be also comma separated list of more types.
If set neither Type nor Col, the translation Action "Set" is applied to all defined column attributes, other Actions are applied to all row cells.
new 15.0 <T> int

Count

Can be set to 1 - 5 to permit more destinations for the same translated values.
If set, the tag can have defined also attributes RowN, ColN, DefN, KindN, TypeN, SpaceN, ActionN, where N is number 1 - 5.
new 14.0 <T> <U> string

N

Attribute name if it contains characters like space and cannot be used as XML attribute name.
new 14.0 <T> <U> string

V

Value of attribute N.
new 14.0 <T>

<U>

XML tag
Child tags of <T> to define attributes those names contain characters like space and cannot be used as XML attribute name.
new 14.0 API method string

Translate

(TRow row, string col, string text, string type)
Translates given text in given cell to actual language.
new 14.0 API event string

OnTranslate

(TGrid grid, TRow row, string col, string text, string type)
Called before the text is translated to the actual language. Return the translated text.
Called from Translate method.
new 14.0 API event string

OnTranslated

(TGrid grid, TRow row, string col, string text, string type)
Called after the text is translated to the actual language. Return the translated text.
Called from Translate method.

Changing language

TreeGrid can change its language and translate all its texts without reloading the whole grid.
new 14.0 <Cfg> string

Language

Saved to cookies except if set LanguageLap='1'
Language code actually used in TreeGrid. It is the Code of one of defined languages in <Languages> tag.
new 14.0 <Cfg> string[]

UseLanguages

Comma separated list of language codes to display in popup menu to select language.
Use it to specify order and / or subset of defined languages to let users to choose from.
It can contain item "-" as separator or item "-xxx-" as caption xxx.
new 14.0 <Cfg> int

LanguagesColumns

[1]
If set, it splits large languages menu to given number of columns.
new 14.0 <Cfg> string

SyncLanguage

[1]
Synchronizes Language and UseLanguages among all grids with the same value of SyncLanguage.
By default it is 1 for all grids to synchronize language among all grids.
new 15.0 <Cfg> int

Reset

[0]
Which features will be reset to defaults, bit array.
1. bit - &1 - Cfg Style, CSS and DialogCSS.
2. bit - &2 - Cfg GanttStyle and GanttCSS.
3. bit - &4 - Cfg Language.
Set it in Defaults.xml if bundled inside GridE.js with only one CSS style and / or one language.
If set, it will always use the settings in Defaults.xml and will ignore all settings in other files and restrict changing the values.
For example it is set to 3 in GridEStandalone.js to reset styles, because it contains only Standard grid style and White Gantt style, but all languages.
new 14.0 <Languages>

<L>

XML tag
Definition of one language. As shortcut the L can be replaced by the language code <L Code="EN" ... is the same as <EN ...
new 14.0 <L> string

Code

Standard two letter language code like "EN", "FR" or "DE". Case insensitive, for API always converted to upper case.
It is used to identify the language, to be set to the Language
Can be set also directly to the tag name: <L Code="EN" ... is the same as <EN ...
It can be also comma separated list of language codes to set more languages at once.
It can be also "*" to set all already present languages.
It can be also "-XX" to set all already present languages except the language XX, for example Code="-EN".
new 14.0 <L> string

Name

Name of the language. It is shown in popup menu to select language.
new 14.0 <L> string[]

Source

["Text,Base,Layout,Data,Lang"]
Comma separated list of data sources to load for given language.
Similar to <treegrid> Source attribute. But the sources here are always loaded one by one.
If the source name is the same as existing data source defined in <treegrid> Source attribute, it uses all its attributes from the original data source and is loaded only if contains different url or other attributes than the original source.
The data source can define all standard data source attributes like xxx_Url or xxx_Param, see Data communication.
Default data sources for language are Text, Base, Layout, Data as standard data sources except Defaults and special data source for languages Lang.
new 14.0 <L> string

Tip

Since 14.0.10. Tip shown for the language in popup menu.
new 14.0 API method bool

SetLanguage

(string code)
Changes grid Language to the code, loads all language resources and re-renders grid.
Returns true if language was set synchronously, false when loading language files asynchronously and null for not existing language.
new 14.0 API event bool

OnSetLanguage

(TGrid grid, string code, bool sync)
Called before the grid language is set to given code. Return true to suppress changing the language.
Called from SetLanguage method.
sync is true if called from next grids due language synchronization.
new 14.0 API event void

OnLanguageSet

(TGrid grid, string code, bool sync)
Called after the grid language is set to given code and all language resources are loaded to grid. Called before the grid is re-rendered.
Called from SetLanguage method.
sync is true if called from next grids due language synchronization.
new 14.0 API event void

OnLanguageFinish

(TGrid grid, string code, bool sync)
Called after the grid language is set to given code and all language resources are loaded to grid and the grid is re-rendered.
Called from SetLanguage method.
sync is true if called from next grids due language synchronization.