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 Ember Express React Svelte Vue Other frameworks NodeJS server SalesForce LWC

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 (custom JavaScript objects) 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

Text, Lines and Pass types

TreeGrid documentation

The Text and Lines types are basic cell types to display editable texts.
They cannot contains HTML tags to display - the < and & characters are automatically escaped.
Text type
Text type is default cell type and shows a text in the cell in one line.
It is edited in <input> tag.
When it is longer than cell width, it is not wrapped to more lines, but it is overflowed.
It is not possible to set or input CR/LF (Enter) characters into the text.
Lines type
Lines type shows a text in the cell in one or more lines.
It is edited in <textarea> tag.
It is automatically wrapped if the text is longer than cell width, but only if it contains white spaces or other characters to wrap on.
It is possible enter CR/LF (Enter) characters into the text if set AcceptEnters='1'.
To put CR/LF into XML into cell value, use XML entity.
Pass type
Special type without any formatting to input password.
It does not show the entered value.
To server are passwords sent not coded!
<C> <cell> string

Type

["Text"] Type="Text" or "Lines"
To define Text type, set column or cell attribute Type to "Text", for Lines type set Type to "Lines".
upd 11.0 <Cfg><C><cell> int

AcceptEnters

[0]
How the Enter key will be handled in Lines type and optionally in other type cells. Bit array.
For 0 the Enter key accepts changes and finishes editing.
For 1 the Enter key inputs LF character (&#x0A). To finish editing is possible by Ctrl / Alt / Shift + Enter or Tab or click outside the cell.
For 2 (new 11.0) the Ctrl / Alt / Shift + Enter key inputs LF character (&#x0A). To finish editing is possible by Enter or Tab or click outside the cell.
For 3 (new 11.0) the Enter and Ctrl / Alt / Shift + Enter key inputs LF character (&#x0A). To finish editing is possible by Tab or click outside the cell.
For 4, 5, 6, 7 (new 11.0) is the same as 0, 1, 2, 3, but it is used also for other types than Lines. If the entered value contains LF, the cell Type is set to Lines.
new 6.0 <C> <cell> string

EmptyValue

[""]
The string displayed when the text empty.
It is shown only for display, not for edit.
It is not escaped, it can contain HTML code.
chg 9.2 upd 15.0 <C> <I> <cell> string

Format

Specifies text format - how the text will be modified for display.

Since 9.2 it can be JSON named array of display values for particular cell values. Format must start by '{'. All other cell values are displayed unchanged. The items can contain HTML code. The names are case sensitive.
For example if <C Type="Text" Format = '{One:"Red", Two:"Green", Three:"<b>blue</b>"}'/> and the cell value is Two, it displays Green, if the cell value is Four, it displays Four.
JSON Format + EditFormat can be used to define name / key pairs for Text and Lines type, especially when used Suggest or Defaults dialog.

Syntax: |LetterType|Prefix|Postfix|Search|Flags|Replace
'|' is any character not contained in any section to separate section values. Remember, it must be the first character in the format.
'LetterType' is number specifies case conversion: 0 - none, 1 - lowercase, 2 - uppercase, 3 - locale lowercase, 4 - locale uppercase
'Prefix' is string added before value
'Postfix' is string added after value
'Search' is RegExp string to replace it for 'Replace' string. This runs before LetterType conversion. 'Flags' are flags for RegExp, any of 'g', 'i', 'm'.
Since 6.4 the Replace string is not escaped when NoFormatEscape='1'.
In Prefix and Postix is not possible to use HTML tags except NoFormarEscape is set. To format the value by HTML tags rather use cell attributes HtmlPrefix and HtmlPostfix instead.
Remember, the Format is applied also when sorting, grouping, filtering or searching.
Since 15.0 it is read also from row.
new 9.2 chg 10.0 upd 15.0 <C> <I> <cell> string

EditFormat

Specifies format for editing - how the text will be modified for edit and the edited value back to data.
JSON named array of input values for particular cell values. Format must start by '{'. All other cell values are edited unchanged. The items must not contain HTML code. The names are case sensitive.
For example if <C Type="Text" EditFormat = '{1:"one", 2:"two", 3:"three"}'/> and cell has value 2, the value for input will be two. If entered 'three', the cell value will be 3, if entered 'four', the cell value will be 'four'.
Since 10.0 it is compared case insensitive.
Since 15.0 it is read also from row.
new 10.0 <C> <cell> string[ ]

EditFormatType

Various settings for the EditFormat. Comma separated list of keywords, case insensitive.
Case - if set, preserves case sensitivity, shows only items that contains the text in the same case.
WhiteChars - uses WhiteChars cell attribute value for comparing.
CharCodes - uses CharCodes cell attribute value for comparing.
chg 12.1 <Cfg> bool

NoFormatEscape

[""]
If set to "" (default), it means 0 for text and 1 for lines, number and date.
If set to 0, the Format Prefix and Postfix is escaped, so the characters & and < are displayed as they are.
If set to 1, you can use HTML tags in columns Format string, in prefix and postfix for text and anywhere for numbers.
Since 12.1 it is applied also for Lines type.
new 16.4 <Format> bool

TextFormatRange

[0]
If set it applies Format Search / Replace in Range cell to individual items.
new 7.0 <C> int

VarHeight

[0]
Set to columns containing wrap able cells, to shrink row height when the column is resized by a user and cells values occupy less height.
For 1 the rows are resized after column resizing finishes.
For 2 it resizes the rows during column resizing, it can be slow and should be used only for small grids.