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

Line charts

TreeGrid documentation

TreeGrid can compute and show classic line charts, point charts, XY point charts.
These charts can be shown in TreeGrid space cell from sources in grid data column(s).
The charts are available also in standalone TreeGrid library to use it without TreeGrid itself.

Charts in grid cells

TreeGrid can show one or more charts in space row cells of type Chart.
new 6.4 <Space cell> string

Type

["Text"] Type="Chart"
Type="Chart" sets the cell to show line chart.
new 6.4 <Space cell> string

Chart

The chart settings in JSON format.
The individual Lines settings are used for individual lines according to the sources in SourcesY.
See the TLineChart object.
new 6.4 <Space cell> string[ ]

SourcesY

Specifies column names where to get the Y sources for the chart.
Every column will produce one line.
new 6.4 <Space cell> string[ ]

SourcesX

Specifies column names where to get the X sources for the Y values.
If defined, the chart will the XY point chart.
If not defined, it produces standard line chart and the X will be set as 0 - p, where p is the row count+1 used for Y sources.
new 6.4 <Space cell> string

Parent

To show chart only for children of some row in tree, set the Parent to the parent row id.
new 6.4 <Space cell> string[ ]

Refresh

List of columns. If any cell in the column is changed by user, the chart is recalculated.
By default it contains all columns from SourcesX and SourcesY.
Use it when some source columns are calculated, to specify their sources here.
<Space cell> int

Width

Width of the cell in pixels. It specifies the Width of the chart.
It is possible to use also RelWidth, but it can remarkably slow down grid or column resizing, because for every cell resize will be the chart repainted.
<Space> int

Height

Height of the whole row in pixels. It specifies the Height of the chart.
new 6.4 API method void

GetChart

(string id)
Returns the actually rendered TLineChart object with the given id.
The chart is accessible only after it is rendered.
new 6.4 API method void

RefreshChart

(string id)
Recalculates and repaints the actually rendered TLineChart object with the given id.
It just calls RefreshCell for the cell displaying the chart.

Chart JSON definition

The chart is defined in JSON format.
When used in TreeGrid, the data sources are defined by cell attributes SourcesX and SourcesY.
When used standalone, the sources are defined by X, Y parameters of TChartLine. And the chart is shown by ShowLineChart function.

In documentation, the global object is called TLineChart and the individual objects in Lines array are named TChartLine.

JSON Example in TreeGrid Chart attribute (in XML without data):
Col1Chart="
{
id: 'Chart1',
Top: 5, Right: 5,
AxisX: 5, LabelX: 5, Bottom: 20,
AxisY: 5, LabelY: 5, Left: 20,
ChartRoundY: 5, ChartAddY: 0.5,
Lines: [
{ Width:1, PointType:1, Color:'red' },
{ Width:3, PointType:0, Color:'blue' }
]
}"


JSON Example of standalone version with data (in JavaScript with data):
ShowLineChart(
{
id:'Chart1',
Top: 5, Right: 5,
AxisX: 5, LabelX: 5, Bottom: 20,
AxisY: 5, LabelY: 5, Left: 20,
ChartRoundY: 5, ChartAddY: 0.5,
Lines: [
{ X:[-0.25,0,0.25,0.5,0.75,1,1.5,2,3,5],Y:[-1,0,-1,-2,-1,0,1,2,1,0], Width:1, PointType:1, Color:'red' },
{ Points:{'-0.25':1,0:0,0.25:1,0.5:2,0.75:1,1:0,1.5:-1,2:-2,3:-1,5:0}, Width:3, PointType:0, Color:'blue' }
]
},'MyTag');

Base chart settings

Basic attributes

new 6.4 TLineChart string

id

Unique id of the chart.
By this id can be the chart accessible from JavaScript - by global array LineCharts[id] or by TreeGrid API method GetChart(id).
new 6.4 TLineChart TChartLine[ ]

Lines

Array of settings of individual lines.
In standalone usage the lines contain also points data.
new 6.4 TLineChart TChartLine

Default

Default settings for all lines.
These attributes of Default are used when the line does not have defined the attribute.
new 6.4 TLineChart string

Class

["GMChart"] Only standalone usage
Class prefix for all items in the chart.
For TreeGrid usage it is set always to <Cfg Style> value + "Chart"

Size

new 6.4 TLineChart int

Width

Width of the chart space in pixels.
If not set, it is computed from the parent tag or cell width.
new 6.4 TLineChart int

Height

Height of the chart space in pixels.
If not set, it is computed from the parent tag or row height.
new 6.4 TLineChart float

MinX

The first X value shown in the chart = the left constraint.
If not set, it is used minimal value from X sources rounded down by ChartRoundX and decreased by ChartAddX.
new 6.4 TLineChart float

MaxX

The last X value shown in the chart = the right constraint.
If not set, it is used maximal value from X sources rounded up by ChartRoundX and increased by ChartAddX.
new 6.4 TLineChart float

ChartRoundX

Rounds the first X down and last X up in chart if not set MinX and MaxX.
new 6.4 TLineChart float

ChartAddX

Subtracts the value from the first X and adds to the last X in the chart if MinX and MaxX not set.
Default value is 10 pixels (yes, pixels, but any set value is in X units).
new 6.4 TLineChart float

MinY

The first Y value shown in the chart = the top constraint.
If not set, it is used minimal value from Y sources rounded down by ChartRoundY and decreased by ChartAddY.
new 6.4 TLineChart float

MaxY

The last Y value shown in the chart = the bottom constraint.
If not set, it is used maximal value from Y sources rounded up by ChartRoundY and increased by ChartAddY.
new 6.4 TLineChart float

ChartRoundY

Rounds the first Y down and last Y up in chart if not set MinY and MaxY.
new 6.4 TLineChart float

ChartAddY

Subtracts the value from the first Y and adds to the last Y in the chart if MinY and MaxY not set.
Default value is 10 percent (yes, percent, but any set value is in Y units).

Axis and caption

new 6.4 TLineChart int

Left

Space in pixels reserved from left. Used for Axis Y labels.
new 6.4 TLineChart int

Right

Space in pixels reserved from right.
new 6.4 TLineChart int

Top

Space in pixels reserved from top. Used for caption.
new 6.4 TLineChart int

Bottom

Space in pixels reserved from bottom. Used for Axis X labels.
new 6.4 TLineChart float

AxisX

Shows horizontal lines in chart. The line positions are rounded to this count of x units values.
For example value 5 means the line will be shown at ..., -15, -10,-5, 0, 5, 10, 15, ...
new 6.4 TLineChart float

LabelX

Shows the labels for AxisX lines, below the chart. The label position is rounded to this count x units value.
The space for the labels should be reserved by Bottom attribute.
For example value 10 means the label will be shown at ..., -20, -10, 0, 10, 20 ...
new 6.4 TLineChart string

LabelXFormat

Format string to format the label x numbers.
It is standard TreeGrid Format string.
new 6.4 TLineChart float

AxisY

Shows vertical lines in chart. The line positions are rounded to this count of y units values.
For example value 5 means the line will be shown at ..., -15, -10,-5, 0, 5, 10, 15, ...
new 6.4 TLineChart float

LabelY

Shows the labels for AxisY lines, left to the chart. The label position is rounded to this count y units value.
The space for the labels should be reserved by Left attribute.
For example value 10 means the label will be shown at ..., -20, -10, 0, 10, 20 ...
new 6.4 TLineChart string

LabelYFormat

Format string to format the label y numbers.
It is standard TreeGrid Format string.
new 6.4 TLineChart string

Caption

Text shown above the chart, the space for it should be reserved by Top attribute.

Individual chart lines

Data sources

new 6.4 TChartLine float[ ]

X

Only standalone usage
The X values for the chart.
If not defined, it will be set as 0,1,2,3,4,5,6 ... - Y length
In TreeGrid the X values are defined in column(s) set by cell SourcesX.
new 6.4 TChartLine float[ ]

Y

Only standalone usage
The Y values for the chart.
If not defined, it will be set as 0,1,2,3,4,5,6 ... - X length
In TreeGrid the Y values are defined in column(s) set by cell SourcesY.
new 6.4 TChartLine int

Sort

[1]
If and how will be data sources sorted.
0 - no sort, the chart will be XY points chart.
1 - sort by X, the chart will be horizontal Line chart.
2 - sort by Y, the chart will be vertical Line chart.
new 6.4 TChartLine bool

Connect

[0]
Connect also the first and the last points by line.
It connects the points only when Sort is 0, otherwise it just interpolates the last parts like in continuous function.

Visual settings

new 6.4 TChartLine bool

Visible

[1]
If this line chart is visible.
To easily show and hide the individual lines from the chart
new 6.4 TChartLine int

Interpolation

[3]
Interpolation function used to connect the points
0 - none (line is hidden), 1 - linear (straight lines between points), 2 - cosine, 3 - hermite, 4 - cubic.
new 6.4 TChartLine int

Width

[2]
Width of the line in pixels. 0 hides the line.
new 6.4 TChartLine string

Color

["black"]
CSS color used for the line. It can be any string usable for CSS background attribute.
new 6.4 TChartLine string

Color2

When set, the Color2 is used for ascending lines and the Color for descending lines. It can also simulate 3d effect of the line.
new 6.4 TChartLine int

PointType

[1]
Type of the point, it is number of icon.
0 - hidden, 1 - black, 2 - red, 3 - blue, 4 - green, 5 - pink, 6 - yellow, 7 - light blue, 8 - gray

API for standalone usage

new 6.4 global func. TLineChart

ShowLineChart

(TLineChart Chart, string tag)
Calculates and renders the Chart into the tag. The tag can be tag id or HTMLElement itself.
It can be called also after any change in the Chart to recalculate and re-render it.