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

Gantt API

TreeGrid documentation

To control Gantt chart you can use all standard Extended API methods and events for TreeGrid controlling, like AddRow, DeleteRow, SetValue and so on.
You can change the data source values by API SetValue method and the Gantt chart will be automatically recalculated.
Many changes in Gantt chart are mirrored to other columns (e.g. Ancestors/Descendants), call CheckGantt before SetValue to check if the change is possible and also to update other Gantt columns accordingly.
API event bool

OnGanttStart

(TGrid grid)
Event called when Gantt chart is created for first time. Returns true to not create the Gantt chart (useful when it is already called RefreshGantt).
new 9.2 chg 10.0 upd 12.0 API event bool

OnGanttChange

(TGrid grid, TRow row, string col, string item, type new, type new2, type old, type old2, string action)
Event called before any item in Gantt chart has been changed by a user interaction in the Gantt.
Return true to cancel the change.
For the parameters see the OnGanttChanged event below.
new 6.0 chg 10.0 upd 12.0 API event void

OnGanttChanged

(TGrid grid, TRow row, string col, string item, type new, type new2, type old, type old2, string action)
Event called after any item in Gantt chart has been changed by a user interaction in the Gantt.
It is not called when the source cells are changed by edit - use here OnAfterValueChanged event instead.
It is also not called when resources are assigned from popup dialog.
It is called after the change is applied.
row, col is the Gantt chart cell.
item is the changed part, can be: MainX (X is plan as empty or 1,2,3,...), CompleteX, TextX, Flow, FlowText, Run, Constraint, Flags, FlagTexts, FlagIcons, Resources, Dependency, Lag

For Main bar: new = new Start date, new2 = new End date or new Duration, old = old Start date, old2 = old End date or duration, action = Move, Resize, Delete, DeleteAll, New, Correct
Since 9.2, the new2/old2 is duration if no GanttEnd column is defined, otherwise it is the end date.
To better control the main bar change use OnGanttMainChange / OnGanttMainChanged API events instead of OnGanttChange / OnGanttChanged.
For Complete:new = new Complete status, old = old Complete status, action = Change, DeleteAll
For Text:new = new Main bar Text, old = old Main bar Text, action = Change, DeleteAll
For Resources:new = new Resources text, old = old Resources text, action = Change (not called for choosing resources from popup menu), DeleteAll
For Flow:new = new Flow range, old = old Flow range, action = New, Delete, DeleteAll, Move, Resize removed 10.0
For FlowText:new = new FlowText, old = old FlowText, action = Change, DeleteAll removed 10.0
For Run bar: new = new Run value, new2 = new RunStart, old = old Run value, old2 = old RunStart value, action = Slide, Resize, Delete, DeleteAll, New, Move, MoveSource, Copy, Remove, RemoveSource It is possible to parse the new and old run values by GetGanttRun method.
To better control changes in individual Run boxes use OnGanttRunBoxChanged and OnGanttRunBoxNew events.
For RunComplete:new = new RunComplete status, old = old RunComplete status, action = Change, DeleteAll
For Flags:new = new Flags, old = old Flags, action = Move, Delete, DeleteAll, New
For FlagTexts:new = new FlagTexts, old = old FlagTexts, action = Delete, DeleteAll, New, Change
For FlagIcons:new = new FlagIcons, old = old FlagIcons, action = Delete, DeleteAll, Change
For Points:new = new Point or Point, old = old Points or Point, action = Move, Delete, DeleteAll, New
For Dependency: new = new dependency row ids (descendants), new2 = (new 12.0) the dependency object like returned by GetDependencies, old = old dependency row ids (descendants), action = New, Delete, Edit (lag, called twice)
For Lag:new = new DependencyLag value, old = old DependencyLag value, action = Change, Delete, DeleteAll removed 10.0
For Constraint:new = new Constraint value, new2 = (new) ConstraintType, old = old Constraint value, old2 = old ConstraintType for Change, action = New, Delete, Move, Change
new 6.4 API event string

OnGanttTip

(TGrid grid, TRow row, string col, string tip, object XY, string name)
Called to get a tip text for Gantt object to display it on mouse hover.
tip is the default tip text, return it or new tip.
XY are Gantt objects under mouse cursor returned by GetGanttXY.
name is the Gantt object name, can be: Main, Milestone, Flow, Run, Flags, Points, Constraints, Dependency.
new 9.1 API event bool

OnStartDragGantt

(TGrid grid, TRow row, string col, string name, int start, int end, int dir, object XY, string keyprefix, int clientX, int clientY)
Called on start dragging any object in Gantt chart except Run. For Run use OnDragGanttRun or OnGanttRunDrop instead.
Return true to suppress dragging.
For parameters description see OnDragGantt event.
new 9.1 upd 9.3 API event bool

OnEndDragGantt

(TGrid grid, TRow row, string col, string name, int start, int end, int oldstart, int oldend, int dir, object XY, string keyprefix, int clientX, int clientY, TRow ToRow)
Called on end dragging any object in Gantt chart except Run. For Run use OnDragGanttRun or OnGanttRunDrop instead.
Return true to cancel the change.
For parameters description see OnDragGantt event.
new 9.1 upd 9.3 API event int

OnDragGantt

(TGrid grid, TRow row, string col, string name, int start, int end, int oldstart, int oldend, int dir, object XY, string keyprefix, int clientX, int clientY, TRow ToRow)
Called during dragging any object in Gantt chart except Run. For Run use OnDragGanttRun or OnGanttRunDrop instead.
row, col is the Gantt cell.
name is the dragged Gantt object name, can be: Main, Milestone, Flow, Run, Flags, Points, Constraints.
start, end are new start and end dates of the Gantt object, as count of milliseconds since 1/1/1970. For milestone, flag, point and constraint is end the same as start.
oldstart, oldend are original start and end dates of the Gantt object.
dir is dragging direction, 1 left edge (resize), 2 right edge (resize), 3 both edges (move).
step is count of calling the OnDragGantt since dragging started. It is 0 for the first call.
XY is the dragged Gantt object returned by GetGanttXY.
keyprefix is prefix of shift keys: "Ctrl", "Alt", "Shift" and also mouse button "Right" or "Middle". The key is before the mouse, e.g. keyprefix='CtrlRight'.
clientX, clientY is mouse position on page.
ToRow (since 9.3) is the row under mouse cursor. Now only for flags can differ from the row.
Return null for normal behavior
Return 0 to suppress the last change
Return false to cancel dragging and restore original state
Return true to finish dragging and save this last change
new 10.0 API event type

OnStartDragGanttDependency

(TGrid grid, TRow row, string col, object XY, int color, bool start, string keyprefix, int clientX, int clientY)
Called on start dragging dependency.
row, col is actual Gantt cell where the dragging starts, XY is the Gantt object returned by GetGanttXY the dependency is being dragged from.
color is dependency color and shape (0-39) that will be assigned to the dependency during dragging. It can be different from final color according to the GanttAssignDependencies value.
start is 1 if the dependency starts from the box start, 0 if dependency starts from the box finish.
keyprefix is prefix of shift keys: "Ctrl", "Alt", "Shift" and also mouse button "Right" or "Middle". The key is before the mouse, e.g. keyprefix='CtrlRight'.
clientX, clientY is mouse position on page.
Return true to suppress dragging. Return JavaScript array as [color, start] to change these values for the new dependency.
new 10.0 API event type

OnDragGanttDependency

(TGrid grid, TRow row, string col, object XYSrc, TRow torow, object XYDest, bool end, string keyprefix, int clientX, int clientY)
Called during dragging dependency.
row, col is source cell where dragging started. XYSrc is the Gantt object returned by GetGanttXY where dragging started.
torow is destination row (under mouse cursor), XYDest is the Gantt object returned by GetGanttXY under mouse cursor, can be null if there is no bar under mouse that accept dependencies.
end is 1 if the dependency points to the destination box start, 0 if dependency points to the destination box finish.
keyprefix is prefix of shift keys: "Ctrl", "Alt", "Shift" and also mouse button "Right" or "Middle". The key is before the mouse, e.g. keyprefix='CtrlRight'
clientX, clientY is mouse position on page.
Return null for normal behavior.
Return -1 to not permit the dependency to attach to the destination bar. Ignored if there is no destination bar.
Return 0 to attach dependency to the destination bar finish. Ignored if there is no destination bar.
Return 1 to attach dependency to the destination bar start. Ignored if there is no destination bar.
Return false to cancel dragging and restore original state.
Return true to finish dragging and attach the dependency. Ignored if there is no destination bar.
new 10.0 API event bool

OnEndDragGanttDependency

(TGrid grid, object[ ] New, object[ ] Old)
Called after finish dependency dragging.
New is an array of new dependencies that will be added, in format like GetDependencies. Now the array contains only one dependency.
Old is an array of old dependencies that will be deleted, in format like GetDependencies. In case the new dependency replaces other dependencies between the same bars.
It is possible to modify parameters in New array to add dependency with different parameters (e.g. lag or type).
It is possible to remove some item from Old to not remove these dependencies.
Return true to suppress adding the dependencies (and deleting the old). Return true also in case you added the dependencies in this event handler.
Return false for default behavior.
new 13.0 API event string

OnEndDragGanttRange

(TGrid grid, int d1, int d2, string action)
Called after dragging range in Gantt finishes. Usually in Gantt header.
action can be ZoomGantt (action ZoomGantt) or SelectRun (action SelectGanttRunRange).
Return new action or empty string to suppress the action.
chg 9.0 upd 11.0 API method void

RefreshGantt

(int show = 255, string col = null)
Recalculates Gantt chart(s). Also shrinks chart to show only used date range.
show is binary mask of items to refresh (since 9.0, prior to 9.0 it was always 1 as 255 or 0 as 254).
&1 - if the changes will be displayed in chart. For 0 the grid needs to be rerendered.
&2 - if the width of Gantt will be recalculated. If the width of Gantt is changed, it also refreshes header and background.
&4 - if the GanttHeader and GanttBackground will be recalculated.
&8 - if the dependency settings will be recalculated for all tasks. If some of them changed, it refreshes all dependency lines in grid.
&16 - if all dependency lines in grid will be refreshed.
&32 - if recalculates GanttSlack
&64 - if recalculates Gantt charts in all variable rows
&128 - if recalculates Gantt charts in all fixed rows
&256 - (new 11.0) clears GanttRun cache, reads all the runs again from the source strings
For example RefreshGantt(179) means (1+2+16+32+128), so it recalculates Gantt width, all dependency lines, slack and fixed rows and shows changes.
When col set, recalculates only chart in this column, otherwise recalculates all charts in grid.
Should be called after any Gantt option changes by API, e.g. for zooming.
new 10.0 API variable bool

GanttUpdate

[0]
If set to 1, temporary disables creating the Gantt. Requires call of RefreshGantt ( ).
Use to speed up some action, like: Grid.GanttUpdate = 1; /* do here some long updating action */; Grid.GanttUpdate = 0; Grid.RefreshGantt ( );
upd 7.0 API method void

RefreshGanttDependencies

(int show = 1, string col = null)
Recalculates and redraws Gantt chart dependencies, useful when some rows show / hide.
(Since 7.0) For show = 2 recalculates also all cell dependency inputs, use when some global dependency setting changes (e.g. GanttIncorrectDependencies).
API method void

Recalculate

(TRow row, string col, bool show = 0)
Re-calculates grid after given cell changes, according to cell's or row's parameter Recalc.
Always recalculates fixed calculated rows.
It recalculates also Gantt chart in that row, if any.
new 9.3 API method void

RecalculateRows

(TRow[ ] rows, bool show = 0)
Recalculates given rows in given order.
Recalculates also Gantt chart in these rows. If the recalculation changes Gantt size, it refreshes whole Gantt chart.
It does not recalculate any other row (except the Gantt, see above), so if the calculation affects some other rows, they should be recalculated manually too.
Remember, this function breaks CalcOrder in tree, as stated above!
To display the changes in grid call the function with the second parameter (show) as 1.
The rows can be: a) array of TRow object, b) one TRow object, c) array of row ids (strings), d) one row id (string)
chg 10.0 upd 12.0 API method object

GetGanttXY

(TRow row, string col, int x, int y) or (int clientX, int clientY)
Returns Gantt objects on given position. x, y is the position inside the cell.
Useful to provide some custom action on click or on drag or on hover
The object has set these properties when given tag is on the given position:
string Type type of the top most (hovered) object, can be: "main", "run", "flags", "points", "constraints", "dependency"
Since 10.0 it can be also "line" for GanttLines, GanttBase and GanttFinish.
HTMLElement Main the main bar tag
int MainPlan(new 10.0) index (from 0) of the Main bar plan, see GanttCount.
int MainIndexindex (from 0) of the Main box when the bar is not continuous and more boxes exist in the cell
int MainType(changed 10.0) type of the Main tag, can be null (complete is null), 0 (not started part), 50 (incomplete part), 100 (complete part), Milestone
int MainXthe X position inside the Main tag.
int MainIcon(new 12.0) the side icon, 0 none, 1 left, 2 right
 
HTMLElement Main2the second main bar tag for incomplete tasks - the other part that is not on the given position. (removed 10.0)
int MainPosposition of the Main tag - 0 alone, 1 left side, 2 - right side (removed 10.0)
HTMLElement Flowthe real flow tag on given position (removed 10.0)
HTMLElement Flow2(new 6.4) the second real flow tag for incomplete tasks that is not on given position (removed 10.0)
int FlowPos(new 6.4) position of the incomplete Flow tag - 0 alone, 1 left side, 2 - right side (removed 10.0)
int FlowIndexindex (from 0) of the Flow tag when the flow is not continuous and more flow tags exists in the cell (removed 10.0)
int FlowXthe X position inside the Flow tag (removed 10.0)
 
HTMLElement Runthe continuous run tag on given position
int RunIndexindex (from 0) of the Run box inside its cell
int RunXthe X position inside the Run tag
int RunTypetype of the Run box
string RunClass(new 10.0) class of the Run box
string RunId(new 10.0) id of the Run box, if set
string RunGroup(new 10.0) group of the Run box, if set
int RunState(new 10.0) state of the Run box, bit array: 1 - disabled, 2 locked, 4 selected, 8 added, 16 deleted, 32 moved, 64 resized, 128 changed.
string RunContainer(new 13.0) The top Run container, only if no box is on the position. If set, the Run and RunX are related to the container and RunIndex and the others are for the first box in the container.
string[] RunContainers(new 13.0) All Run containers, only if no box is on the position. The last one is the RunContainer.
 
HTMLElement Flagthe flag tag on given position
HTMLElement FlagText(new 10.0) the flag text tag on given position
int FlagIndexindex (from 0) of the Flag tag when the cell contains more flags
int FlagXthe X position inside the Flag tag.
 
HTMLElement Point(new 6.4) the point tag on given position
int PointIndex(new 6.4) index (from 0) of the Point tag when the cell contains more points
int Point X(new 6.4) the X position inside the Point tag.
 
HTMLElement Constraintthe constraint tag on given position
int ConstraintXthe X position inside the Constraint tag.
string ConstraintTypecan be "MinStart", "MaxStart", "MinEnd", "MaxEnd"
 
int Line(new 10.0) Index of the line in GanttLines or -1 for GanttBase or -2 for GanttFinish
int LineLeft(new 10.0) Left position in pixels
int LineWidth(new 10.0) Width in pixels
int LineStart(new 10.0) Line start date in milliseconds
int LineEnd(new 10.0) Line end date if any, in milliseconds
string LineClass(new 10.0) Line CSS class part
int LineFlags(new 10.0) Flags of the line. &1 -if the line is editable, &2 - if the line can be placed on excluded dates, &4 if the LineStart is end date
 
string DependencyFrom(new 10.0) row id the dependency comes from
string DependencyFromBox(new 10.0) main bar plan number or run box id the dependency comes from
string DependencyTo(new 10.0) row id the dependency goes to
string DependencyToBox(new 10.0) main bar plan number or run box id the dependency goes to
string DependencyType(new 10.0) type of the dependency like fs, ss, sf, fs. Can be empty for fs.
int DependencyStart(new 10.0) Start date of the dependency, in milliseconds since 1/1/1970. It does not contain the lag.
int DependencyEnd(new 10.0) End date of the dependency, in milliseconds since 1/1/1970
int DependencyLag(new 10.0) Lag of the dependency start in milliseconds.
int DependencySpan(new 10.0) Maximal span of the dependency in milliseconds
int DependencyColor(new 10.0) Number of color / shape of the dependency, 0 - 40 or null
 
string DependencyStartLeftlist of ids of all rows that are connected from this left side. The ids are separated by Lang.ValueSeparator (';'' by default) (removed 10.0)
string DependencyStartRightlist of ids of all rows that are connected from this right side. (removed 10.0)
string DependencyEndLeftlist of ids of all rows that are connected to this left side. (removed 10.0)
string DependencyEndRightlist of ids of all rows that are connected to this right side. (removed 10.0)
new 8.0 API method object

GetGanttHeaderXY

(TRow row, string col, int x, int y) or (int clientX, int clientY)
Returns object for specific cell of Gantt header.
Useful to provide some custom action on click or on drag or on hover, for example to show special tip for header cell in OnTip event.
The object has set these properties:
int Header -index of the GanttHeader attribute, 1 - 5
int Start - start date shown in the cell
int End - start date of the next cell
string Units - GanttUnits used in the cell, e.g. "d" or "w"
int X, Y - click position relative to the cell in pixels
int X, Y - click position relative to the cell in pixels
new 6.3 chg 7.0 API method type

CheckGantt

(TRow row, string col, string val)
Checks if given cell can get value val, if it is correct for Gantt chart.
If the cell cannot be changed to val, it returns false and does not do any change.
If the value is correct, it returns the val.
In some cases (since 7.0) it can change the val (e.g. because of exclude settings), it returns the new value.
If it does not return false, it has already done changes in grid, so the value must put into the cell.
It updates Gantt chart when the source column value changes to val (e.g. mirroring Ancestors / Descendants or End / Duration).
Call it before the cell change to know if it can be done and to provide required changes in Gantt chart.
This method is called automatically when the cell is changed by editing or from Gantt chart by a user.
It check circular dependencies, percentage complete, negative duration, End>Start.
The checking depends on GanttCheck settings.
To set value to Gantt source cell by API use: val = grid.CheckGantt(row,col,val); if(val!==false) grid.SetValue(row,col,val,1);
new 7.0 API event type

OnCheckGantt

(TGrid grid, TRow row, string col, string newval)
Called to check new Gantt value after editing.
It is called for every cell, even for all not Gantt cells. Called only when Gantt chart defined and GanttCheck is not 0.
Return false to suppress the change and continue editing
Return true to permit the change without further default checking
Return null to default behavior
Return changed value to be used instead newval. The default checking will be still done for this changed value.
newval is new value for the cell, col is cell column, not Gantt column.
new 6.3 API method bool

HasGantt

( )
Returns true if in the grid exists Gantt column
new 6.3 API method bool

HasDependencies

( )
Returns true if the Gantt chart has defined some dependencies
new 6.3 API method int

GetGanttDate

(int pos, string col = null)
Returns exact date (as count of milliseconds) on the given position in chart, in pixels
new 6.3 API method int

GetGanttPos

(int pos, string col = null)
Returns position in chart, in pixels of the date (as count of milliseconds)
new 10.0 API method int

GanttUnitsDuration

(string units = null, string col = null)
Returns duration of given units as GanttUnits in milliseconds, e.g. for "m" returns 60000.
If units = null, returns duration for GanttDataUnits.
If units = 0, returns duration for GanttUnits.
For special variable duration units like 'M', 'M3', 'M6' and 'y' returns average duration.
new 6.3 upd 11.0 API method int

RoundGanttDate

(int date, int round, int base = null, string col = null, string units = null, TRow row = null)
Rounds and returns the given Gantt date (as count of milliseconds) according to the round.
round is bit array:
1 - round to beginning of the unit, 2 - round to end of the unit,
4 - round to last work time before, 8 - round to first work time after
16 - like 1, but after rounding to worktime, 32 - like 2, but after rounding to worktime
48 - move back to original unit if it was moved to another because it had no work time
64 - input (date and base) is position in pixels instead of date, 128 - returns position in pixels instead of date
256 - (new 11.0) adds / subtracts GanttPage position for values 64 and 128.
For example round = 1+4+32+128 rounds to beginning, next to workday before, next to end and returns position in pixels
base is base date (count of milliseconds), if set, to the resulted date is added difference between base and base rounded to units.
units can be set to any Gantt units like 'd' or 'h' or null for GanttUnits attribute.
(new 8.0) row is row object used to calculate worktime when the row has set custom GanttCalendar.
new 6.4 upd 8.0 API method int

DiffGanttDate

(int start, int end, string units = null, string last = null, string col = null, TRow row = null)
Returns count of units between dates, in workdays.
start and end can be set set as count of millisecond or by English date string.
units are standard GanttDataUnits like 'd' or 'h'. If not set, GanttDataUnits are used.
last can be set to standard GanttDataUnits like 'd' or 'h' to add this unit to the end date. If set to 1, one GanttDataUnits is added.
col - gantt column to use, if not set, the first gantt column in grid will be used.
If set holidays (GanttExclude) and the units are bigger than exclude units, it returns count of units that contain at least one work time unit.
(new 8.0) row is row object used to calculate worktime when the row has set custom GanttCalendar.
new 6.7 upd 8.0 API method int

IncGanttDate

(int start, int dur, string units = null, bool beg = false, string col = null, TRow row = null)
Returns start date increased for dur count of units.
start can be set as count of millisecond or by English date string.
dur is count of units in workdays, without excluded dates. Can be negative to decrease the date.
units are standard GanttDataUnits like 'd' or 'h'. If not set, GanttDataUnits are used. Should not be 'M' and bigger units.
beg - if the resulted date is in holidays, for 0 it returns last work date before and for 1 first work date after.
col - gantt column to use, if not set, the first gantt column in grid will be used.
(new 8.0) row is row object used to calculate worktime when the row has set custom GanttCalendar.