News in version
TreeGrid Gantt chart SpreadSheet Examples Documentation Download Development Licensing Prices References Contacts Buy Try it free
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

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


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

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
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

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 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

Paging columns

TreeGrid documentation

TreeGrid can automatically split middle columns to pages and displays them only on demand - when the page becomes visible due scroll.

new 7.0 <Cfg> int


Method of column paging used.

0No paging
All columns are in one page. All columns are rendered on start. This means slow start and fast use.
It is good for small grids, up to about 30 columns.

1Show all
Column pages are automatically created, but all are rendered on start.
It is good for medium grids, 30 - 100 columns, to let users to easy navigate between parts in grid.
It can be used also to avoid browser "Slow script" message when rendering too many rows without paging.

2Client paging     (auto - fully done by TreeGrid)
Column pages are automatically created.
The column page is rendered only when it is visible in window by scrolling.
It is good for large grids with more than 100 columns. All functions still work offline, include sorting, filtering, grouping, searching and calculations.
The client paging does not require any server side support.
new 9.3 <Cfg> bool


If set to 0 (and set ColPaging>0), it will page only variable body rows, not fixed rows.
Usable especially for spanned header or other fixed rows among column pages.
If the columns are not paged in IE8 there is a limit for number of columns 500 when WidthPad is set and up to 1000 without WidthPad set.
new 7.0 <Cfg> int


Count of column in the first (left) page.
This page is rendered always on start, so it is displayed immediately with grid.
It can be set to 0 to not render any column on start.
new 7.0 <Cfg> int


Count of columns per page, except the first one and the last one.
Exact count of columns in page can differ due to adding or deleting columns.
Every page must contain at least one column otherwise it is deleted.
<Cfg> int


How long (in ms) must be page visible (by scroll) before it renders.
new 7.0 <Cfg> int


Maximum rendered column pages in grid, only for ColPaging = '2'.
When grid contains more rendered pages, the pages longer not accessed are cleared (only in HTML, pages data are not affected).
Used to not slow down the browser when too many HTML tags are displayed.
For large pages you can lower this value.
The actually displayed pages are never cleared.
Set it to 0 to disable clearing pages.
new 9.0 <Cfg> int


If set to 0, it never removes unused root pages, child pages/parts and column pages.
If set to 2, it removes unused pages due MaxPages, MaxChildParts and MaxColPages.
If set to 3, it removes also data of unused root pages or child pages.
It removes only page or child page that does not contain changed rows.
<C> int


Saved to cookies, avoid it by <C WidthLap='1'/>
Column width in pixels. It is outer width including all side buttons, cell border and padding.
Set it when there are many columns in grid to speed up grid loading.
new 7.0 <C> bool


If all row values in this column are prepared and do not need to be updated on start.
Use it when the grid has many rows to speed up grid loading.
The preparing values does these things:
- Date type cell values set as strings are converted to numbers as count of milliseconds since 1/1/1970.
- Int and Float types empty values are converted to zero if set CanEmpty.
- Select type is converted to Button='Defaults'
- For Calculated rows without CalcOrder is the CalcOrder created from all (not Prepared) columns with Formula attribute.
You can set Prepared='1' for columns that does not contain Date, Int, Float and Select types or the Date are set as numbers or the Float and Int are not source of calculations.

Auto adding column pages

Automatic adding new column pages on scroll

new 12.0 <Cfg> bool


If set, adds new column pages to the end of grid when it is scrolled right to the end of grid.
The columns gets their Def = "Auto".
To use it, must be set also ColPaging to 1 or 2.
Printed, exported and uploaded are columns to last not empty column, see GetLastDataCol API method.
new 12.0 <Cfg> int


If the empty added column pages will be automatically removed when the grid is scrolled up.
0 - never
1 - yes, the removed pages will be placed to RemovedColPages and will be recreated from this stack. Useful to preserve the names of the new columns and for Undo.
2 - yes, the removed pages will be thrown out.
The page is removed only if cells in all columns on the page and on all next pages are empty (values and EditAttrs).
new 12.0 API event void


(TGrid grid, int pos)
Called after new column page is added due AutoPages.
pos is column page index in ColNames.
new 12.0 API event bool


(TGrid grid, string[] cols)
Called before removing given column page due RemoveAutoColPages.
The cols is an array contains column names on the page.
Return true to not remove this page and any of the previous pages.
new 12.0 API variable string[][]


The removed pages due RemoveAutoColPages.
Can be set to null, to permanently remove these pages.
It is two dimensional array, the first dimension are the pages and they contain the column names. The order of the pages is backward!
The columns can be iterated in such loop: for(var P=grid.RemovedColPages,i=P?P.length-1:-1;i>=0;i--) for(var j=0;j<P[i].length;j++){ var col = P[i][j]; ... }
new 13.2 API method void


Adds one new column page. The page should be immediately shown otherwise it is later deleted.


new 7.0 API event void


(TGrid grid, int sec)
Called before rendering of the column page.
The sec is the section index to ColNames.
new 7.0 API event void


(TGrid grid, int sec)
Called the column page is fully rendered and ready.
The sec is the section index to ColNames.
new 7.0 upd 11.0 API method void


(string[] names, string def = "C", bool updatefixed = 1)
Adds new column page to the end of variable columns.
names is list of the column names to add. It can be also number as count of the columns to add.
(since 11.0.) the individual names item can be object instead of string, with defined column attributes, it must have set at least Name attribute.
e.g. AddColPage(["Col1",{Name:"Col2",CanEdit:0},"Col3",{Name:"Col4",Def:"Special"}]);
def is name of default column to use for all the columns to fill their attributes.
updatefixed (since 11.0) if fixed rows will be refreshed (for ColPagingFixed=0). Set it to 0 in all calls except the last one to speed up the function when adding more column pages at once.
After the method finishes, the columns are not displayed yet, so they can be changed or the row values in the columns can be filled directly.
new 11.0 API method void


(int section, int count = 1)
Removes given column page and deletes all its column from data.
section is column section number as in ColNames.
The fixes column page (section = 0 and section = ColNames.length-1) cannot be removed.
The count can be set to remove more adjacent pages at once.
new 7.0 API method void


( )
Starts loading and rendering displayed column pages. Asynchronous.
Call this method if pages are not rendered automatically when you do some unusual changes in grid.
new 10.0 API method void


( )
Re-creates the column pages, re-places the columns to the column pages.
You can call it after adding many new not displayed columns.
You must call Render / Rerender method after calling the CreateColPages.
For example how to add many columns to already rendered grid fast:
for(var i=0;i<500;i++) G.AddCol('c'+i,1,null,{Width:50,Type:'Html'}).Visible = 1;
G.CreateColPages(); G.Rerender();