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) Upgrading from 9.3 to 10.0 Upgrading from 5.9 to 6.0

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 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 Defaults list Suggest list (auto complete) 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) 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

Cell types
Auto 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 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 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 Basic settings Communication with server Export API 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
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 Language & regional setup (Text.xml) 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 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

Column position and moving

TreeGrid documentation

There are three column sections in grid - Left (0), Mid (1) and Right (2). In API methods are the sections identified by their indexes (0,1,2).
The Left (0) and Right (2) sections are fixed sections by default and always show all its content and no horizontal scrollbars. It is possible to have scrollable also the Left and Right section, see Section widths.
The Mid (1) section is positioned between Left and Right section and its content can be scrolled horizontally.

Column are placed into its section in input XML, in <LeftCols> (Left), <Cols> (Mid), <RightCols> (Right).
Column position inside section is set by the position of <C> tag inside its XML section <LeftCols>, <Cols>, <RightCols>.
The column position is saved to cookies, so the mentioned position is used only first time. To not save the position to cookies set <Cfg ColsPosLap='1'/> or <ColsLap='1'/>.

The columns can be moved by a user by mouse dragging, inside or among sections, controlled by <C CanMove/> attribute.
Or can be moved by API method MoveCol.
<Cfg> bool

ColMoving

[1]
If columns can be moved by a user - dragged by mouse. Use column CanMove attribute to specify if and how can be individual columns moved.
chg 6.3 <C> int

CanMove

[2/1/0]
If and how column can be moved by a user - dragged by mouse.
0 - no
1 - only inside its section (Left, Mid, Right)
2 - inside and also between sections - user can freeze variable columns and vice versa.
For spanned columns see also Group attribute.
By default it is 0 for Panel, Index, Gantt and ConstWidth columns, 1 for columns added by AutoCols, and 2 for all other columns.
When column has CanMove='0', since 6.3 can be moved columns right to this column in left section, left to it in right section and both side in variable columns.
renamed 9.2 <C> int

Block

[0]
Controls moving column, it is useful especially if there are some cells spanned to or from other columns.
If set to > 0, it is the block the column belongs to. Create blocks that contain the spanned cells. The blocks must be continuous.
The columns can be moved only inside its block and any other column cannot be moved into the block from outside.
The first (left) column in the block cannot be moved within the block and also must stay the first.
The whole block can be moved by dragging the first left column to another location.
It also preserves splitting block of columns to more pages when printing and for column paging.
Since 9.2 it was renamed from Group.
<Cfg> bool

ColsPosLap

Suppresses loading column positions from cookies and always use their positions in input XML.
<Cfg> bool

ColsLap

Suppresses loading column positions, visibility and widths from cookies and always use the settings in input XML.
<Cfg> bool

ShowDrag

[1] Saved to cookies, to not load it, set ShowDragLap='1'
If shows dragged object under mouse cursor. The dragged row(s) or moved column(s).
It can be changed by a user in configuration menu.
new 7.0 <Cfg> int

ScrollColOnDrag

[100]
The step (speed) when automatically scrolling column section horizontally while dragging column on the left or right edge.
new 7.0 <Cfg> bool

AllCols

[0]
If set in input data XML, it says that the XML contains all columns definition and their position in <Cols> tag will change their position in grid.
Useful to set to change already defined columns position in later XML.
It is cleared before every input XML and must be defined before all <LeftCols>,<Cols> and <RightCols> definition.
new 12.0 <C> string

Next

If set in input data XML, it moves or places the column before the Next column. The Next column must already exist.
If it is set to empty string, moves existing column to the end of the section where it is defined.
It is cleared after the column is placed or moved.
<Actions>

ColMove

Attached to OnDragHeader, can be attached only to OnDrag... event
Starts moving column by mouse dragging.
The column can be moved inside Header or to DropCols cells.
It is affects by ColMoving and CanMove attributes.
new 12.0 <Actions>

ColMoveSelected

Attached to OnDragHeader, can be attached only to OnDrag... event
Starts moving selected columns by mouse dragging. Fails if actual column is not selected.
The columns can be moved only inside Header. Ignores Block attributes.
It is affects by ColMoving and CanMove attributes.
upd 12.0 API event void

OnColMove

(TGrid grid, string col, string copy)
Called after column is moved to another position by a user (not by API).
(new 12.0) copy is new column name when the column is copied, not moved.
upd 6.0 API method void

MoveCol

(string col, string tocol, bool right, bool noshow = 0) or (string col, int sec, bool last, bool noshow = 0)
Moves column to new position. If noshow is set, does not display changes and needs to call Render.
a) Moves column col in front of column tocol (or after tocol if right is 1).
b) Moves column col to section sec (0 - left, 1 - mid, 2 - right), to beginning (or to the end if last is 1). Use when destination section is empty.
Remember, moving column is slow process, much slower than moving row, all the column cells must be moved one by one.
Remember, this function can re-render the whole grid in some cases (when it leads to hide or show the whole column section).
chg 7.0 API method void

ChangeColsPositions

(string[ ] leftcols, string[ ] cols, string[ ] rightcols)
Changes positions of all columns in grid and splits them to sections.
All three arguments are Arrays of column names sorted according to their positions in given section.
Since 7.0 it can be called only in OnLoaded or OnCfgLoaded to change the column positions on grid start.
All column names in grid must be given!
It does not save changes to cookies.
It does not update horizontally spanned cells!
new 7.0 API TCol var. int

MainSec

read only
Column section - 0 Left, 1 Mid, 2 Right
chg 7.0 API TCol var. int

Sec

read only
Column section/page - 0 Left, 1 Mid, 2 Right
(New 7.0) When set ColPaging, it is number of column page, 0 Left, 1 - (N-2) Mid, (N-1) Right, where N is the ColNames.length
API TCol var. int

Pos

read only
Column position inside its section / page Sec, from 0. All columns including hidden.