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

Gantt icons Flag & Point

TreeGrid documentation

Movable, but not resizable Gantt objects, without dependencies.

Flag

Information for date(s) - one or more different icons, text boxes or both

Defined by GanttFlags (date ranges) and GanttFlagTexts (texts for individual flags, displayed as text box or tooltip).
<C> <cell> string

GanttFlags

Gantt source - column name or exact value
A list of dates (separated by semicolon) where to display a flag with information specified by GanttFlagTexts.
It can be column name, a list of date string (M/d/yyyy hh:mm:ss) or a list of counts of milliseconds.
If it is column name, the column must be Type='Date' Range='1'.
new 9.3 <C> <cell> int

GanttFlagsType

[1]
0 - Reserved
1 - The flag will be shown as icon. As default icon or icon defined in GanttFlagIcons. The GanttFlagTexts will be shown as tooltip on mouse over.
2 - The flag will be shown as text defined in GanttFlagTexts.
3 - The flag will be shown as icon and text (right next to the icon) defined in GanttFlagTexts.
<C> <cell> string

GanttFlagTexts

Gantt source - column name or exact value
A list of information for the individual flags. Separated by semicolon or by GanttTextsSeparator.
This information is shown as text right to the icon or as hint (TITLE) for the flag, according to the GanttFlagsType setting.
It can be column name or a list of strings.
new 6.1 <C> <cell> string

GanttFlagIcons

Gantt source - column name or exact value
A list of icons for the individual flags. Separated by semicolon. The icon is the exact url of the icon.
The icon can be empty to show default Flag icon.
The icon can be '-' (minus) to not show any icon, only the text (only for GanttFlagsType=3).
Hover icons can be set by GanttHoverIcons.
new 9.3 <C> <cell> string

GanttFlagClasses

Gantt source - column name or exact value
A list of CSS classes for the individual flag texts defined in GanttFlagTexts. Separated by semicolon. The value is exact CSS class name.
new 6.1 <C> <cell> string[*]

GanttFlagIconList

A list of predefined icons. The icon is the exact url of the icon. First character separated array.
This list is shown in popup menu to choose the flag icon.
new 9.3 <C> <cell> string[*]

GanttFlagClassList

A list of predefined CSS classes. The value is the exact CSS class. First character separated array.
new 6.1 upd 9.3 <C> <cell> string[*]

GanttFlagIconNames

It contains menu item names for the GanttFlagIconList. First character separated array.
The item name can contain:
%1 to be replaced by the icon from IconList (in <span></span> tag)
%2 to be replaced by the CSS class from ClassList (open tag) and %3 as close tag)
If not defined, the exact icon is shown as the item and short tag with CSS class.
new 6.4 <C> <cell> string

GanttFlagsTip

Tip shown on mouse hover the flag. It can contain HTML code.
By default it shows the value for the flag from GanttFlagTexts.
It can also show values from other cells in row, set by *col* where col is the column name.
It can show also the specials: *Text* - show the GanttFlagTexts, *Start* - date of the flag, *Index* - the flag index (from 1)
Example: "*Index*. *Start*<br>*Text*"
To dynamically generate the tip text use OnGanttTip API event.
new 10.0 <C> <cell> int

GanttFlagsTop

Vertical position of all flags in the cell, in pixels.
new 9.3 <C> int

GanttFlagsMove

[1]
If and how the flags can be moved
0 - no, 1 - inside row, 2 - also between rows
The dragging can be more controlled by API OnDragGantt event.
new 13.0 <C> string

GanttTextsSeparator

If set, it is used instead of Lang.Format.ValueSeparator to separate texts in GanttFlagTexts and GanttMarkTexts.
new 13.2 <C> int

GanttCenter

[2]
If and how the Flags, Points and main bar milestones will be centered.
0 - no, left side of the icon is placed to the exact date, 1 - yes, center of the icon is placed to the exact date, 2 - yes, center of the icon is placed to center of the GanttUnits unit.
It is not used in GanttUnits months and years.
new 9.3 API event bool

OnGanttFlagMove

(TGrid grid, TRow row, string col, int index, int date, TGrid togrid, TRow torow, string tocol, int toindex, int todate)
Called befor flag moved to another row. Called instead OnGanttChange. Return true to cancel the action.
When flag moved inside the same row, there is called only OnGanttChange(grid,row,col,"Flags",newval,null,oldval,null,"Move") where newval/oldval are the values of GanttFlags cell.
grid, row, col is source cell, togrid, torow, tocol is destination cell. Now the grid is always equal to togrid, but it can be changed in future.
index is position in source GanttFlags array. toindex is position in destination GanttFlags array (it is equal to length of destination GanttFlags array).
date is an original start date of the flag, in count of millisencods, the todate is a new start date.
new 9.3 API event void

OnGanttFlagMoved

(TGrid grid, TRow row, string col, int index, int date, TGrid togrid, TRow torow, string tocol, int toindex, int todate)
Called after flag moved to another row. Called instead OnGanttChanged.
When flag moved inside the same row, there is called only OnGanttChange(grid,row,col,"Flags",newval,null,oldval,null,"Move") where newval/oldval are the values of GanttFlags cell
Parameters are the same as OnGanttFlagMove.
new 9.3 upd 16.0 API event string

OnGetGanttFlagText

(TGrid grid, TRow row, string col, int index, string text, bool export)
Called to get the flag text HTML content to render it. It can return any HTML code or text.
index is the Flag index inside the Flags, text is original text to.
export (since 16.0) is set when exporting to xlsx.
Called only if GanttFlagsType is 2 or 3.
new 9.3 API event string

OnGetGanttFlagIcon

(TGrid grid, TRow row, string col, int index, string icon)
Called to get the flag icon. It can return exact url of the icon.
index is the Flag index inside the Flags, icon is original icon url.
Called only if GanttFlagsType is 1 or 3.
new 9.3 API event string

OnGetGanttFlagIconHover

(TGrid grid, TRow row, string col, int index, string icon)
Called to get the flag icon displayed under mouse cursor. It can return exact url of the icon.
index is the Flag index inside the Flags, icon is original icon url.
Called only if GanttFlagsType is 1 or 3.
new 7.0 <Actions>

MoveGanttFlag

Attached to OnDragGantt, cannot be attached anywhere else
Moves flag by mouse dragging.
Fails, if mouse is not above flag or the flag cannot be moved.
<Actions>

NewGanttFlag

Attached to OnDblClickGantt event
Adds new flag on mouse position and lets a user edit its text.
<Actions>

DeleteGanttFlag

Attached to OnDblClickGantt event
Deletes one flag under mouse cursor.
It fails if there is no flag under mouse cursor.
<Actions>

EditGanttFlag

Attached to OnDblClickGantt event
Lets a user to edit text of flag under mouse cursor.
It fails if there is not flag under mouse cursor.
new 6.1 <Actions>

ChooseGanttFlagIcon

Not attached to any event
Lets a user to choose icon and / or class of the flag under mouse cursor.
The possible icons and classes are defined by GanttFlagIconList, GanttFlagClassList and GanttFlagIconNames.

Point

Point at date(s) - one or more different movable bullets

new 6.4 <C> <cell> string

GanttPoints

Gantt source - column name or exact value
The GanttPoints can be defined by four ways:
- Comma separated list of column names where are the individual values stored, for example GGanttPoints='A,B,C' A='1/1/2000' B='2/1/2000' C='4/2/2000' (columns A,B,C must be Type='Date')
- Column name where are the column names stored, for example GGanttPoints='X' X='A,B,C' A='1/1/2000' B='2/1/2000' C='4/2/2000' (columns A,B,C must be Type='Date')
- Direct list of values, comma or semicolon separated, it is not changeable, for example GGanttPoints='1/1/2000;2/1/2000;4/2/2000'
- Column name where are the direct values stored, for example GGanttPoints='X' X='1/1/2000;2/1/2000;4/2/2000' (column X must be Type='Date' Range='1')
Only the last definition supports checking exclude and constraints when editing the source cell.
new 6.4 <C> <cell> string

GanttPointsIcons

Gantt source - column name or exact value
A list of icons for the individual points, in the same order. Separated by comma or semicolon. The icon is the exact url of the icon.
It can be also one of predefined classes 1 - 8, defined in Grid.css as GxGanttPoint1 - GxGanttPoint8:
1 - black, 2 - red, 3 - blue, 4 - green, 5 - pink, 6 - yellow, 7 - light blue, 8 - gray
For example GanttPointsIcons="1;4;Red.gif;Green.gif;6;Blue.gif"
Hover icons can be set by GanttHoverIcons.
new 6.4 upd 7.0 <C> <cell> string[ ]

GanttPointsEdit

If the individual points can be changed by a user. Comma separated list of 0/1/2 values.
0 - not editable, 1 fully editable, 2 (since 7.0) can move, but cannot delete
new 6.4 <C> <cell> string

GanttPointsTip

Tip shown on mouse hover the point. It can contain HTML code.
It can also show values from other cells in row, set by *col* where col is the column name.
It can show also the specials: *Start* - date of the point, *Index* - the point index (from 1), *Col* - name of the column where the point value is stored
Example: "*Col* = *Start*"
To dynamically generate the tip text use OnGanttTip API event.
new 10.0 <C> <cell> int

GanttPointsTop

Vertical position of all points in the cell, in pixels.
new 13.2 <C> int

GanttCenter

[1]
If and how the Flags, Points and main bar milestones will be centered.
0 - no, left side of the icon is placed to the exact date, 1 - yes, center of the icon is placed to the exact date, 2 - yes, center of the icon is placed to center of the GanttUnits unit.
new 6.4 deleted 10.0 <C> int

GanttPointsShift

[3]
Replaced by GanttShift.
Minimal distance between adjacent points.
If points are on the same place, the next will be shifted right for this value.
new 7.0 <Actions>

MoveGanttPoint

Attached to OnDragGantt, cannot be attached anywhere else
Moves point by mouse dragging.
Fails, if mouse is not above point or the point cannot be moved.
new 6.4 <Actions>

NewGanttPoint

Attached to OnDblClickGantt event
Adds new point on mouse position.
new 6.4 <Actions>

DeleteGanttPoint

Attached to OnCtrlClickGantt event
Deletes the point under mouse cursor.
It fails if there is no point under mouse cursor.