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

Gantt popup menu

TreeGrid documentation

new 7.1 upd 15.0 <C> <cell> string[*]

GanttMenu

[...]
Defines all items in right click popup menu in the Gantt column for given cell or whole column
It can be first character separated array of menu item names. The items can contain any HTML code. Separator can be shown as item named '-'
Or it can be in standard TreeGrid menu format as complex menu with sub levels, sub menus, columns and so on.
See also API ShowMenu function to show custom menu from JavaScript.

It is possible to change the order or remove some items.
You can also add new custom items and define OnGanttMenuClick API event to be called on click to the custom item.

The predefined menu item texts are defined in Text.xml, in <Lang><Gantt></Lang>.
Default Gantt menu is defined in Defaults.xml, in <D Name="Gantt" ... /> and contains all these items in this order:

Item name used in GanttMenu Text defined in Text.xmlWhen shown and notes
DelGanttConstraint Delete %d constraint Shown on constraint and constraints are editable
SplitGanttConstraint Split the %d constraint Shown on mandatory constraint and constraints are editable
ChangeGanttConstraint Set the constraint as %d Shows up to four items to change to all possible constraints. Shown on constraint and constraints are editable
 
DelGanttFlag Delete the flag Shown on flag and flags are editable
EditGanttFlag Enter the flag text Shown on flag and flags are editable and the GanttFlagTexts column is defined
ChooseGanttFlagIcon Select the flag icon Shown on flag and flags are editable and the GanttFlagIcons column is defined
 
DelGanttPoint Delete the point Shown on point and points are editable
 
DelGanttFlowPart Delete the real flow bar Shown on flow bar and the flow is editable (deleted 10.0)
Delete milestone Shown on flow milestone and the flow is editable (deleted 10.0)
SplitGanttFlow Split the real flow bar Shown on flow and the flow is editable (deleted 10.0)
SetGanttFlowPercent Update completed status here Shown on flow and the flow is editable and the GanttFlowComplete is defined (deleted 10.0)
EditGanttFlowPercent Enter completed status Shown on flow and the flow is editable and the GanttFlowComplete is defined (deleted 10.0)
EditGanttFlowText Enter the real flow information Shown on flow and the flow is editable and the GanttFlowText column is defined (deleted 10.0)
 
DelGanttMilestone Delete milestone Shown on milestone, the main bar is editable and GanttSummary is not set
SetGanttMilestone Set the milestone complete Shown on incomplete milestone, the main bar is editable, GanttSummary is not 1 and GanttComplete column is defined
Set the milestone incomplete Shown on complete milestone, the main bar is editable, GanttSummary is not 1 and GanttComplete column is defined
DelGanttMainPart Delete the bar (new 10.0) Shown on main bar, the main bar is editable and GanttSummary is not set and there are more main bar parts
DelGanttMain Delete the task Shown on main bar, the main bar is editable and GanttSummary is not set
DisableGanttMain Disable the task (new 10.0) Shown on main bar, the main bar is editable
Enable the task
LockGanttMain Lock the task (new 10.0) Shown on main bar, the main bar is editable
Unlock the task
SplitGanttMain Split the bar (new 10.0) Shown on main bar, the main bar is editable, GanttSummary is not set and the GanttParts is defined
SetGanttPercent Update completed status here Shown on main bar, the main bar is editable, GanttSummary is not set and GanttComplete column is defined
EditGanttPercent Enter completed status Shown on main bar, the main bar is editable, GanttSummary is not set and GanttComplete column is defined
EditGanttText Enter the main bar information Shown on main bar or milestone, the main bar is editable and GanttText column is defined
 
SelectGanttRunPart Select the box (new 10.0) Shown on run bar that is not selected
Unselect the box (new 10.0) Shown on selected run bar
DisableGanttRun Disable the task / Disable the box (new 10.0) Shown on run bar, the run bar is editable
Enable the task / Enable the box
LockGanttRun Lock the task / Lock the box (new 10.0) Shown on run bar, the run bar is editable
Unlock the task / Unlock the box
LockGanttRunContainer Lock all %d boxes in container (new 13.0) Shown on run container, the run container is editable
DisableGanttRunContainer Disable all %d boxes in container (new 13.0) Shown on run container, the run container is editable
EnableGanttRunContainer Enable all %d boxes in container (new 13.0) Shown on run container, the run container is editable
SplitGanttRun Split the bar / Split the box (new 10.0) Shown on run bar except End/Bound and the run is editable and GanttRunError contains 'Merge'
EditGanttRun Change the box text Shown on run bar except End/Bound and the run is editable
EditGanttRunTip Change the box information Shown on run bar except End/Bound and the run is editable
ChooseGanttRunType Change the box Shown on run bar except End/Bound and the run is editable
ChooseGanttRunContainer Change the container (new 13.0) Shown on run container, the run container is editable
AddGanttRunContainer Add new container for the box (new 13.0) Shown on run bar except End/Bound and the run is editable
-
DelGanttRunPart Delete the box Shown on run bar except End/Bound and the run is editable
RemoveGanttRunPart Remove the box (resize to 0 and delete) (new 15.)Shown on run bar except End/Bound and the run is editable
DelGanttRunContainerOnly Delete the container (new 13.0) Shown on run container, the run container is editable
-
SelectGanttRun Select all boxes (new 10.0) Shown if there is no selected box in the row / grid
UnselectGanttRun Unselect all boxes (new 10.0) Shown if there are some selected boxes in row / grid
JoinGanttRunSelected Join selected boxes (new 11.0) Shown when there are available selected bars that can be joined by Nbsp
SplitGanttRunJoined Split joined boxes (new 11.0) Shown on joined run bar
JoinGanttRunAdjacent Join adjacent boxes (new 11.0) Shown on adjacent run bar that can be directly joined
SplitGanttRunAdjacent Split joined adjacent boxes (new 11.0) Shown on directly joined run bar
ChooseGanttRunSelectedType Change selected %d boxes (new 10.0) Shown if there are some selected boxes in the row / grid
ChooseGanttRunGroupType Change %d boxes in row group Shown on run bar except End/Bound and the run is editable. Only if there are more boxes with the same Group attribute as this box in the same row
ChooseGanttRunGroupAllType Change %d boxes in group Shown on run bar except End/Bound and the run is editable. Only if there is a box with the same Group attribute as this box in another row
ChooseGanttRunRowType Change all %d boxes in row (new 11.0) Shown on run bar except End/Bound and the run is editable. Only if there is a box with the same Group attribute as this box in another row
ChooseGanttRunContainerType Change all %d boxes in container (new 13.0) Shown on run container, the run container is editable
-
DelGanttRunSelected Delete selected boxes (%d boxes) (new 11.0) Shown if there are some selected boxes in the row / grid
RemoveGanttRunSelected Remove selected boxes (%d boxes) (new 15.0) Shown if there are some selected boxes in the row / grid
DelGanttRunGroup Delete row group (%d boxes) Shown on run bar except End/Bound and the run is editable. Only if there are more boxes with the same Group attribute as this box in the same row
RemoveGanttRunGroup Remove row group (%d boxes) (new 15.0) Shown on run bar except End/Bound and the run is editable. Only if there are more boxes with the same Group attribute as this box in the same row
DelGanttRunGroupAll Delete group (%d boxes) Shown on run bar except End/Bound and the run is editable. Only if there is a box with the same Group attribute as this box in another row
RemoveGanttRunGroupAll Remove group (%d boxes) (new 15.0) Shown on run bar except End/Bound and the run is editable. Only if there is a box with the same Group attribute as this box in another row
-
SetGanttRunMilestone Set the milestone complete Shown on incomplete run Milestone or Stop, the run is editable, GanttRunComplete column is defined. Only if the run contains only the box.
Set the milestone incomplete Shown on complete run Milestone or Stop, the run bar is editable, GanttRunComplete column is defined. Only if the run contains only the box.
SetGanttRunPercent Update completed status here Shown on run bar, the run is editable, GanttRunComplete column is defined. Except the run contains the only milestone.
EditGanttRunPercent Enter completed status Shown on run bar, the run is editable, GanttRunComplete column is defined. Except the run contains the only milestone.
EditGanttRunText Enter the task information Shown on run bar, the run is editable, GanttRunText column is defined.
-
EditGanttResource Change resources Shown if resources are editable and GanttResources column is defined
GanttDepLagChange Change the dependency lag (chg 10.0) Show on dependency line and the dependencies and lags are editable
-
DelGanttDep Delete the dependency (chg 10.0) Show on dependency line and the dependencies are editable
DelAllGanttDep Disconnect all dependencies Shown if there is some incoming/outgoing dependency in any GanttTask in the cell
DelGanttMainDep Delete main bar and dependencies Shown if there is some incoming/outgoing dependency and the GanttTask bar (main or flow or run) that is editable (deleted 10.0)
Delete milestone and dependenciesShown if there is some incoming/outgoing dependency and milestone and the main bar is in the GanttTask and the main bar is editable (deleted 10.0)
DelGanttMainBar Delete the task Shown on main bar and the main bar is editable
DelGanttMainAll Delete all tasks (new 10.0) Shown if there is main bar and the main bar is editable
DelGanttFlow Delete real flow Shown if there is flow bar and the flow is editable and GanttFlowComplete column is not defined (deleted 10.0)
Delete main bar Shown if there is flow bar and the flow is editable and GanttFlowComplete column is defined (deleted 10.0)
DelGanttRun Delete all boxes Shown if there is run bar and the run is editable
DelGanttRunContainer Delete all %d boxes in container (new 13.0) Shown on run container, the run container is editable
DelGanttFlags Delete all flags Shown if there is some flag and the flags are editable
DelGanttPoints DelGanttPoints Shown if there is some editable point
DelGanttConstraints Delete all constraints Shown if there is some constraint and the constraints are editable
DelGanttAll Clear the gantt cell Shown if there is any object in the cell that can be deleted
-
NewGanttFlag Add new flag to selected point Shown if there is no flag under mouse, the flags are editable, GanttFlags column is defined and the adding does not violate constraints
NewGanttPoint Add new point to selected point Shown if it is possible to add new point here
NewGanttConstraint Add %d constraint here Shows up to six items for every constraint that can be added to this place
NewGanttMilestone Add new milestone here Shown if there is neither main bar nor milestone, the main bar is editable, GanttStart column is defined and the adding does not violate constraints
NewGanttEndMilestone Add new ending milestone here Shown if there is neither main bar nor milestone, the main bar is editable, GanttEnd column is defined and the adding does not violate constraints
NewGanttFlowMilestone Add new milestone here Shown if there is no flow bar under mouse, the flow is editable, GanttFlowComplete is defined and the adding does not violate constraints (deleted 10.0)
NewGanttFlowEndMilestone Add new ending milestone here Shown if there is no flow bar under mouse, the flow is editable, GanttFlowComplete is defined and the adding does not violate constraints (deleted 10.0)
NewGanttRunMilestone Add new milestone here Shown if there is no run bar under mouse, the run is editable, GanttRun column is defined, GanttRunMilestones=1 and the adding does not violate constraints
NewGanttRunStop Add new stop here Shown if there is no run bar under mouse, the run is editable, GanttRun column is defined, GanttRunMilestones=1 and the adding does not violate constraints
-
SetGanttBase Set project start here Shown on computed start line (if GanttBase is empty) and GanttBaseCanEdit is set
DelGanttBase Delete project start Shown on start line (if GanttBase is not empty) and GanttBaseCanEdit is set
SetGanttFinish Set project finish here Shown on computed finish line (if GanttFinish is empty) and GanttFinishCanEdit is set
DelGanttFinish Delete project finish Shown on finish line (if GanttFinish is not empty) and GanttFinishCanEdit is set
CorrectRelatedDependencies Correct related dependencies Shown on Gantt task if there is some dependency error in the group related to this task
CorrectAllDependencies Correct all dependencies in chart Shown if there is some dependency error in chart
-
ZoomBar Zoom to bar (new 10.0) Shown on bar (main or run) and GanttSmoothZoom>=1
ZoomAll Zoom to all objects (new 10.0) Shown if the cell contains some object (Main, Run, Flags, Points) and GanttSmoothZoom>=1
ZoomHeader Zoom to %d %d - %d (new 10.0) Shows more menu items, one per Gantt header row with different units
ZoomUndo Zoom back to %d (new 10.0) Shown to undo last zoom change
ZoomIn Zoom in to %d (new 10.0) Shown if it is possible to increase zoom level
ZoomOut Zoom out to %d (new 10.0) Shown if it is possible to decrease zoom level
ZoomFit Zoom fit to actual space (new 10.0) Shown always

Any other item name is custom name and its click must be handled by OnGanttMenuClick API event.
new 7.1 API event string

OnGetGanttMenu

(TGrid grid, TRow row, string col, string menu, object GanttXY)
Called to get the popup GanttMenu attribute dynamically by JavaScript.
menu is the original menu for the cell with all default and custom values. It should return new menu string.
GanttXY is object returned by GetGanttXY method and contains information about the Gantt bar(s) under mouse cursor.
new 6.1 API event bool

OnGanttMenu

(TGrid grid, TRow row, string col, TMenu Menu, object GanttXY)
Called before the Gantt popup menu is displayed for the appropriate cell.
Menu is TreeGrid JavaScript TMenu object, here can be changed, items modified, added or deleted and so on.
GanttXY is object returned by GetGanttXY method and contains information about the Gantt bar(s) under mouse cursor.
Return true to cancel showing menu.
new 7.1 chg 10.0 API event bool

OnGanttMenuClick

(TGrid grid, TRow row, string col, string name, TMenuItem Item, object GanttXY)
Called when a user clicks to an item in GanttMenu. Since 10.0 it is called for all GanttMenu items, not only for custom ones.
name is clicked custom item Name or standard item Text, Item is the whole clicked item object.
GanttXY is object returned by GetGanttXY method and contains information about the Gantt bar(s) under mouse cursor in time of the menu display.
Return true to suppress default behavior.
<Actions>

GanttMenu

Attached to OnRightClickGantt event
Shows popup menu with available actions for given clicked point in the Gantt cell.
chg 6.0 <C> <cell> string[*]

Menu

[...]
For compatibility with 6.x and 7.0 version only. In 7.1+ version use GanttMenu attribute instead.
Context (popup) menu for the Gantt cell to add custom items to the default Gantt menu.
chg 6.0 API event bool

OnContextMenu

(TGrid grid, TRow row, string col, string result)
Called when user clicks to context menu set by Menu attribute.
result is Value or Name of the clicked item or all value.
Return true to not close the menu.