Gantt icons Flag & Point

TreeGrid documentation

Movable, but not resizable Gantt objects, without dependencies.

Flag

Information for date(s) - one or more different icons, text boxes or both

Defined by GanttFlags (date ranges) and GanttFlagTexts (texts for individual flags, displayed as text box or tooltip).
<C> <cell> string

GanttFlags

Gantt source - column name or exact value
A list of dates (separated by semicolon) where to display a flag with information specified by GanttFlagTexts.
It can be column name, a list of date string (M/d/yyyy hh:mm:ss) or a list of counts of milliseconds.
If it is column name, the column must be Type='Date' Range='1'.
new 9.3 <C> <cell> int

GanttFlagsType

[1]
0 - Reserved
1 - The flag will be shown as icon. As default icon or icon defined in GanttFlagIcons. The GanttFlagTexts will be shown as tooltip on mouse over.
2 - The flag will be shown as text defined in GanttFlagTexts.
3 - The flag will be shown as icon and text (right next to the icon) defined in GanttFlagTexts.
<C> <cell> string

GanttFlagTexts

Gantt source - column name or exact value
A list of information for the individual flags. Separated by semicolon or by GanttTextsSeparator.
This information is shown as text right to the icon or as hint (TITLE) for the flag, according to the GanttFlagsType setting.
It can be column name or a list of strings.
new 6.1 <C> <cell> string

GanttFlagIcons

Gantt source - column name or exact value
A list of icons for the individual flags. Separated by semicolon. The icon is the exact url of the icon.
The icon can be empty to show default Flag icon.
The icon can be '-' (minus) to not show any icon, only the text (only for GanttFlagsType=3).
Hover icons can be set by GanttHoverIcons.
new 9.3 <C> <cell> string

GanttFlagClasses

Gantt source - column name or exact value
A list of CSS classes for the individual flag texts defined in GanttFlagTexts. Separated by semicolon. The value is exact CSS class name.
new 6.1 <C> <cell> string[*]

GanttFlagIconList

A list of predefined icons. The icon is the exact url of the icon. First character separated array.
This list is shown in popup menu to choose the flag icon.
new 9.3 <C> <cell> string[*]

GanttFlagClassList

A list of predefined CSS classes. The value is the exact CSS class. First character separated array.
new 6.1 upd 9.3 <C> <cell> string[*]

GanttFlagIconNames

It contains menu item names for the GanttFlagIconList. First character separated array.
The item name can contain:
%1 to be replaced by the icon from IconList (in <span></span> tag)
%2 to be replaced by the CSS class from ClassList (open tag) and %3 as close tag)
If not defined, the exact icon is shown as the item and short tag with CSS class.
new 6.4 <C> <cell> string

GanttFlagsTip

Tip shown on mouse hover the flag. It can contain HTML code.
By default it shows the value for the flag from GanttFlagTexts.
It can also show values from other cells in row, set by *col* where col is the column name.
It can show also the specials: *Text* - show the GanttFlagTexts, *Start* - date of the flag, *Index* - the flag index (from 1)
Example: "*Index*. *Start*<br>*Text*"
To dynamically generate the tip text use OnGanttTip API event.
new 10.0 <C> <cell> int

GanttFlagsTop

Vertical position of all flags in the cell, in pixels.
new 9.3 <C> int

GanttFlagsMove

[1]
If and how the flags can be moved
0 - no, 1 - inside row, 2 - also between rows
The dragging can be more controlled by API OnDragGantt event.
new 13.0 <C> string

GanttTextsSeparator

If set, it is used instead of Lang.Format.ValueSeparator to separate texts in GanttFlagTexts and GanttMarkTexts.
new 13.2 <C> int

GanttCenter

[2]
If and how the Flags, Points and main bar milestones will be centered.
0 - no, left side of the icon is placed to the exact date, 1 - yes, center of the icon is placed to the exact date, 2 - yes, center of the unit is placed to center of the GanttUnits unit.
new 9.3 API event bool

OnGanttFlagMove

(TGrid grid, TRow row, string col, int index, int date, TGrid togrid, TRow torow, string tocol, int toindex, int todate)
Called befor flag moved to another row. Called instead OnGanttChange. Return true to cancel the action.
When flag moved inside the same row, there is called only OnGanttChange(grid,row,col,"Flags",newval,null,oldval,null,"Move") where newval/oldval are the values of GanttFlags cell.
grid, row, col is source cell, togrid, torow, tocol is destination cell. Now the grid is always equal to togrid, but it can be changed in future.
index is position in source GanttFlags array. toindex is position in destination GanttFlags array (it is equal to length of destination GanttFlags array).
date is an original start date of the flag, in count of millisencods, the todate is a new start date.
new 9.3 API event void

OnGanttFlagMoved

(TGrid grid, TRow row, string col, int index, int date, TGrid togrid, TRow torow, string tocol, int toindex, int todate)
Called after flag moved to another row. Called instead OnGanttChanged.
When flag moved inside the same row, there is called only OnGanttChange(grid,row,col,"Flags",newval,null,oldval,null,"Move") where newval/oldval are the values of GanttFlags cell
Parameters are the same as OnGanttFlagMove.
new 9.3 API event string

OnGetGanttFlagText

(TGrid grid, TRow row, string col, int index, string text)
Called to get the flag text HTML content to render it. It can return any HTML code or text.
index is the Flag index inside the Flags, text is original text to.
Called only if GanttFlagsType is 2 or 3.
new 9.3 API event string

OnGetGanttFlagIcon

(TGrid grid, TRow row, string col, int index, string icon)
Called to get the flag icon. It can return exact url of the icon.
index is the Flag index inside the Flags, icon is original icon url.
Called only if GanttFlagsType is 1 or 3.
new 9.3 API event string

OnGetGanttFlagIconHover

(TGrid grid, TRow row, string col, int index, string icon)
Called to get the flag icon displayed under mouse cursor. It can return exact url of the icon.
index is the Flag index inside the Flags, icon is original icon url.
Called only if GanttFlagsType is 1 or 3.
new 7.0 <Actions>

MoveGanttFlag

Attached to OnDragGantt, cannot be attached anywhere else
Moves flag by mouse dragging.
Fails, if mouse is not above flag or the flag cannot be moved.
<Actions>

NewGanttFlag

Attached to OnDblClickGantt event
Adds new flag on mouse position and lets a user edit its text.
<Actions>

DeleteGanttFlag

Attached to OnDblClickGantt event
Deletes one flag under mouse cursor.
It fails if there is no flag under mouse cursor.
<Actions>

EditGanttFlag

Attached to OnDblClickGantt event
Lets a user to edit text of flag under mouse cursor.
It fails if there is not flag under mouse cursor.
new 6.1 <Actions>

ChooseGanttFlagIcon

Not attached to any event
Lets a user to choose icon and / or class of the flag under mouse cursor.
The possible icons and classes are defined by GanttFlagIconList, GanttFlagClassList and GanttFlagIconNames.

Point

Point at date(s) - one or more different movable bullets

new 6.4 <C> <cell> string

GanttPoints

Gantt source - column name or exact value
The GanttPoints can be defined by four ways:
- Comma separated list of column names where are the individual values stored, for example GGanttPoints='A,B,C' A='1/1/2000' B='2/1/2000' C='4/2/2000' (columns A,B,C must be Type='Date')
- Column name where are the column names stored, for example GGanttPoints='X' X='A,B,C' A='1/1/2000' B='2/1/2000' C='4/2/2000' (columns A,B,C must be Type='Date')
- Direct list of values, comma or semicolon separated, it is not changeable, for example GGanttPoints='1/1/2000;2/1/2000;4/2/2000'
- Column name where are the direct values stored, for example GGanttPoints='X' X='1/1/2000;2/1/2000;4/2/2000' (column X must be Type='Date' Range='1')
Only the last definition supports checking exclude and constraints when editing the source cell.
new 6.4 <C> <cell> string

GanttPointsIcons

Gantt source - column name or exact value
A list of icons for the individual points, in the same order. Separated by comma or semicolon. The icon is the exact url of the icon.
It can be also one of predefined classes 1 - 8, defined in Grid.css as GxGanttPoint1 - GxGanttPoint8:
1 - black, 2 - red, 3 - blue, 4 - green, 5 - pink, 6 - yellow, 7 - light blue, 8 - gray
For example GanttPointsIcons="1;4;Red.gif;Green.gif;6;Blue.gif"
Hover icons can be set by GanttHoverIcons.
new 6.4 upd 7.0 <C> <cell> string[ ]

GanttPointsEdit

If the individual points can be changed by a user. Comma separated list of 0/1/2 values.
0 - not editable, 1 fully editable, 2 (since 7.0) can move, but cannot delete
new 6.4 <C> <cell> string

GanttPointsTip

Tip shown on mouse hover the point. It can contain HTML code.
It can also show values from other cells in row, set by *col* where col is the column name.
It can show also the specials: *Start* - date of the point, *Index* - the point index (from 1), *Col* - name of the column where the point value is stored
Example: "*Col* = *Start*"
To dynamically generate the tip text use OnGanttTip API event.
new 10.0 <C> <cell> int

GanttPointsTop

Vertical position of all points in the cell, in pixels.
new 13.2 <C> int

GanttCenter

[1]
If and how the Flags, Points and main bar milestones will be centered.
0 - no, left side of the icon is placed to the exact date, 1 - yes, center of the icon is placed to the exact date, 2 - yes, center of the unit is placed to center of the GanttUnits unit.
new 6.4 deleted 10.0 <C> int

GanttPointsShift

[3]
Replaced by GanttShift.
Minimal distance between adjacent points.
If points are on the same place, the next will be shifted right for this value.
new 7.0 <Actions>

MoveGanttPoint

Attached to OnDragGantt, cannot be attached anywhere else
Moves point by mouse dragging.
Fails, if mouse is not above point or the point cannot be moved.
new 6.4 <Actions>

NewGanttPoint

Attached to OnDblClickGantt event
Adds new point on mouse position.
new 6.4 <Actions>

DeleteGanttPoint

Attached to OnCtrlClickGantt event
Deletes the point under mouse cursor.
It fails if there is no point under mouse cursor.