TreeGrid v6.3
Run bar
Run is the most complex bar in TreeGrid Gantt that displays one or more individual boxes in one cell.
It can be used as replacement of the main bar with many extended features.
Or it can be used to create any other bar chart, not only Gantt.
In cell with Run there can be also shown other Gantt objects like flag, main bar, milestone or flow.
The Run is defined by GanttRun (list of individual boxes) and eventually by GanttRunStart (start date).
The run can be defined by one start date and list of widths and types of the individual boxes. The boxes are separated directly one by one, but it supports also empty type for space between boxes.
Or the run can be defined by start dates of individual boxes and their widths or end dates. In this case the empty boxes are automatically added between the boxes.
If the run boxes override each other, they are marked as error and shown in red.
The individual run boxes can have different width, shape, color, caption and tooltip.
<C><cell> string[][] GanttRun Gantt source – column name or exact value new 6.1 upd 7.0.
Definition of individual Run boxes.
If the boxes have not specified Start date, they are displayed from GanttRunStart one by one, without any space.
The definition of boxes is separated by semicolon, the individual items in the box definition are separated by comma.
The semicolon and comma must not be present in any item text in the range.
It is possible to change the separators by adding the both on start, e.g. “&*3*End*Start&20*Box&&20*Box” uses & as box and * as item separator. To be sure that the separator cannot be included in the run data, you can use any Unicode character as separator, e.g. “ 3EndStart20Box 20Box” uses  as box and  as item separator.
Do not fill any useless white characters (spaces) in the definition!
The one box definition is: Width,Type,Text,Class,Tip,Id,Group Must have set also GanttRunStart as the start of the whole run
OR Start,Width,Type,Text,Class,Tip,Id,Group (new 6.2) Does not support Empty and Nbsp and joined boxes
OR Start,End,Type,Text,Class,Tip,Id,Group (new 6.2) Does not support Empty and Nbsp and joined boxes and number data units
All the fields are optional, e.g. “3,End,Start;;5;;3,Solid,End” is the same as “3,End,Start,,;0,Empty,,,;5,Box,,,;0,Empty,,,;3,Solid,End,,”
date Start (new 6.2) Start date of the task, if used, the GanttRunStart is ignored. Use Start date if the tasks are not continuous. Between tasks will be automatically added the Empty boxes
The Start can be count of milliseconds or date string in English format (M/d/yyyy HH:mm:ss or d.M.yyyy HH:mm:ss or yyyy-MM-dd HH:mm:ss)
Does not support types Empty and Nbsp and joined boxes.
date End (new 6.2) End date of the task, used instead of Width. Use End date if you know the start and end dates instead of duration.
The End can be count of milliseconds or date string in English format (M/d/yyyy HH:mm:ss or d.M.yyyy HH:mm:ss or yyyy-MM-dd HH:mm:ss)
The End can be the exact end date or the last data unit, according to setting GanttEndLast.
It is not possible to use it with number data units like GanttDataUnits=’1’
int Width width of the box in GanttDataUnits or in milliseconds, used instead of End date. Use Width if you know duration and not end date.
The empty space (Type=0) can have negative width for overflowed adjacent boxes, these error boxes are displayed in red
int Type Feature of the box, default value is Box if positive Width is set or Empty if Width is not set or is negative.
Since 7.0 also the Width + only one comma is shortcut for Empty box.
For example “1;2,;3;;5” is shortcut to “1,Box;2,Empty;3,Box;0,Empty;5,Box”
Case insensitive keyword, must not contain any spaces. The type is saved back always lowercase
Box Normal box. Can be moved or resized by mouse dragging, depending on other settings.
Can be also moved automatically when other box is resized or moved, depending on other settings.
To permit moving box from its adjacent sibling, there must be defined Empty space between them (with 0 width).
The Empty space is automatically created when the box is defined by its Start date.
Solid Can be moved, but cannot be resized
Left Fixed left - its start cannot be changed, it can be only resized on right side and cannot be moved
Right Fixed right - its end cannot be changed, it can be only resized on left side and cannot be moved
Fixed Fixed both - it cannot be moved or resized
Milestone (new 7.0) Zero width object. Movable, not resizable. Does not show any Text.
Text can be custom icon file, Class can be custom icon file for hover.
Stop (new 7.0) Fixed milestone. Zero width object, not movable, not resizable. Does not show Text.
Text can be custom icon file, Class can be custom icon file for hover.
Empty Empty space between boxes, it is not interactive. Can have also set 0 width, to only separate adjacent boxes, to let them move separately.
Can be automatically shrunk or enlarged when other box is moved or resized, depending on other settings
Two adjacent empty spaces are automatically merged together.
Cannot be used when Start is set for the boxes
Nbsp Not breakable, not resizable, not interactive empty space between boxes.
Can be placed only between two boxes to join them. When there is adjacent Empty space, the Nbsp is automatically removed.
Cannot be used when Start is set for the boxes
Bound If placed as the first box, it is not resizable, not movable fixed start box and is displayed before the start date.
It is not possible to move boxes before or on the fixed start.
If placed as the last box, it is not resizable, not movable fixed end box.
It is not possible to move boxes after or on the fixed end.
If placed anywhere else, it is fixed not deletable box
End If placed as the first box, it is not resizable, but movable start box and is displayed before the start date.
When moving box before or on the start, the start is automatically moved before it.
If placed as the last box, it is not resizable, but movable end box.
When moving box after or on the end, the end is automatically moved after it
It should not be placed anywhere else.
string Text caption displayed on the box, it can contain also these special strings:
%d – replaces it by Width displayed as date formatted by GanttRunFormat.
%n – replaces it by Width displayed as integer formatted by GanttRunFormat.
For Milestone and Stop it is not text, but custom icon file url (like Test/MyIcon.gif). Remember, the icon is shifted left by 8px (the CSS GxGanttMilestone width/2).
string Class CSS class used for the box. This class can predefine the shape and color of the box
There are predefined 17 classes for all basic background colors: Aqua, Black, Blue, Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Orange, Purple, Red, Silver, Teal, White, Yellow.
For custom classes you need to define CSS classes GxGanttRunXXXIn and GxGanttRunXXXOut, where XXX is the Class used here and the Gx is style prefix.
The Out class defines border, the In class background and font.
For custom class in FastGantt=’1’ you need to define one class GxFGanttRunXXX, this class must not change padding, margin and border-width.
For Milestone and Stop it is not text, but custom icon file url (like Test/MyIcon.gif) shown on mouse hover
string Tip tooltip displayed when mouse hovers the box
string Id (new 7.0) unique identification of the box (at least in its group), can be used in API methods (e.g GetGanttRunBox) to find the box.
string Group (new 7.0) Identification of the group of boxes, more boxes can belong to the same group.
string State (new 7.0) State of the box, used only when set GanttRunStates=’1’. It is filled automatically after any change for the box. It is filled only for boxes with Id set.
It can be: added, deleted, moved, resized, changed. It can contain more states separated by plus, e.g. “resized+moved+changed”
If some box is moved from one row to another, it will get deleted flag in source row and added flag in destination row. moved flag is only for move within one row.
<C><cell> string GanttRunStart Gantt source – column name or exact value new 6.1; upd 7.0.
Start date of the Run boxes, usually column name, but can be also date string (M/d/yyyy hh:mm:ss) or count of milliseconds
Used only if the GanttRun does not contain Start dates, but only boxes widths.
Its presence also changed default saving format, see GanttRunSave.
(Since 7.0) If the cells in this column are empty, they are filled on start and also updated automatically according to GanttRun.
(Since 7.0) When its value is changed by user, the GanttRun is modified according to the GanttRunAdjustStart settings.
<C><cell> string GanttRunEnd Gantt source – column name only new 7.0 .
Actual computed end date of the GanttRun.
It is just support column, it should not contain any values in its cells on start.
It is filled on start and also updated automatically according to GanttRun.
When its value is changed by user, the GanttRun is modified according to the GanttRunAdjustEnd settings.
<C> <cell> string GanttRunSave [0] new 6.2; upd 7.0.
Type of GanttRun box attribute structure for save.
0 “Width,Type,Text,Class,Tip” if defined GanttRunStart column or “Start,End,Type,Text,Class,Tip” if not
1 “Width,Type,Text,Class,Tip”
2 “Start,Width,Type,Text,Class,Tip”
3 “Start,End,Type,Text,Class,Tip”
&4 (new 7.0) Values 4 – 7 are similar to values 0 – 3, but use the short format
Omits box type as default, empty type without width as completely empty, empty type with width as width with comma
For example “1,Box;2,Empty;3,Box;0,Empty;5,Box” is written as “1;2,;3;;5”
<C> <cell> string GanttRunFormat new 6.1 .
Date or number format string (like for Type Date or Int) to display box width in the box caption, see GanttRun, part Text.
<C> <cell> string GanttRunTip new 6.4; upd 7.0.
Tip shown on mouse hover the box. It can contain HTML code.
By default it shows the Tip part from GanttRun.
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 original box Tip part from GanttRun, *Index* - the box index (from 1, excluding empty boxes)
*RunText* - (new 7.0) shows the whole run tip from GanttRunText.
*Start* - start date of the box, *End* - end date of the box, *Duration* - length of the run in GanttRunFormat or in GanttDataUnits.
Example: “*Index*. box *Start* - *End*<br>*Text*”
<C> <cell> string GanttRunTipDateFormat new 6.4 .
Date format to display Start and End of the run in GanttRunTip *Start* and *End*.
It is the same format as for Date type.
<C> <cell> string GanttRunText Gantt source – column name or exact value new 7.0 .
Tip / information for the whole run, can be displayed as tooltip
<C> int GanttRunGroupHover [1] new 7.0 .
If mouse hovers a box with Group attribute set, it can highlight all other boxes with the same Group value.
0 – never, 1 only in the same row, 2 - in the whole grid (can be slow)., 3 – in the whole grid, only editable Gantt cells (GanttEdit=’run’)
<C> bool GanttRunStates [1] new 7.0 .
If set to 1, it fills all changes in the box in the State part of the GanttRun. Fills changes only for boxes with Id set.
The deleted boxes are saved to the end as box with type ‘-‘ and empty width and without start/end date items.
<C> bool GanttRunMilestones [1] new 7.0 .
If creating Run milestones by users is permitted.
If set to 0, zero length boxes cannot be created.
<Cfg> int FastGantt [0] new 7.0 .
If set to 1, it renders Run boxes simplified, only by one <div> tag per box.
The Run style looks slightly worse, but the chart is three times smaller and therefore much faster to display and change, especially for rows with 20 and more run boxes.
After change of this setting you must rename all your custom CSS classes in Class part of the GanttRun.
Because the FastGantt boxes can be incorrectly rendered in Firefox with zoom!=100%, it is disabled for this browser. To set FastGantt also in Firefox set it to 2.
The run boxes are independent on each other, they can be resizes or moved individually or together and also it is possible to change their position.
<C> <cell> string[] GanttRunResize [“Resize”] new 6.1; upd 7.0.
Which boxes can be resized. Comma separated list of flag keywords, case insensitive
empty When set nothing, resizing is restricted
Resize Only resizable boxes can be resized
All All boxes, including solid boxes can be resized
There are also attributes read when dragging with appropriate shift key: GanttRunResizeCtrl, GanttRunResizeAlt, GanttRunResizeShift
Since 7.0 there are move actions for other mouse buttons (Right and Middle) as the last suffix: GanttRunResizeRight, GanttRunResizeCtrlRight, GanttRunResizeAltRight, GanttRunResizeShiftRight, GanttRunResizeMiddle, GanttRunResizeCtrlMiddle, GanttRunResizeAltMiddle, GanttRunResizeShiftMiddle
Since 7.0 for touch screens (iPAD) are available events for count of fingers on pad, GanttRunResize1, GanttRunResize2, GanttRunResize3, ..., but because by default in Defaults.xml is the ResizeGanttRun action attached only to OnDrag2Gantt event, these prefixes are ignored. To use them, you need to attach the ResizeGanttRun to appropriate OnDragXGantt event, but it should not be attached to the same events as MoveGanttRun or change the value of <Actions GanttSizeTouch>.
<C> <cell> string[] GanttRunMove [“Slide”] new 6.1; upd 7.0.
How the boxes can be move. Comma separated list of flag keywords, case insensitive
empty When set nothing, moving is restricted
Slide The box can be shifted left or right, but cannot change the box order except GanttRunAdjust contains Error flag. The box cannot be moved outside the row.
Move The moved box will be replaced by empty space
Copy The moved box will stay on the same position and is duplicated to the new position.
Remove The moved box will be removed and next boxes will be shifted according to GanttRunAdjustRemove.
All Also fixed boxes (except Bound) can be moved
Single Only one box will be moved, when there are more adjacent boxes without separating spaces
There are also attributes used when dragging with appropriate shift key: GanttRunMoveCtrl, GanttRunMoveAlt, GanttRunMoveShift
Since 7.0 there are move actions for other mouse buttons (Right and Middle) as the last suffix: GanttRunMoveRight, GanttRunMoveCtrlRight, GanttRunMoveAltRight, GanttRunMoveShiftRight, GanttRunMoveMiddle, GanttRunMoveCtrlMiddle, GanttRunMoveAltMiddle, GanttRunMoveShiftMiddle
Since 7.0 for touch screens (iPAD) are available events for count of fingers on pad, GanttRunMove1, GanttRunMove2, GanttRunMove3, ..., but because by default in Defaults.xml is the MoveGanttRun action attached only to OnDrag1Gantt and OnDrag3Gantt events, only the 1 and 3 prefixes are used. To use the other prefixes, you need to attach the MoveGanttRun to appropriate OnDragXGantt event, but it should not be attached to the same events as ResizeGanttRun or change the value of <Actions GanttSizeTouch>.
<C> <cell> string[] GanttRunAdjust [“Shift”] new 6.1; upd 7.0.
How will be moved next or previous boxes when moving some box. Comma separated list of flag keywords, case insensitive.
The order of applying Error/Resize/Move is set by order of the flag keywords.
empty When set nothing, the box will be moved within surrounding empty space only
Shift The box will be moved or resized within surrounding empty space and if required, the next or previous boxes will be shifted and their empty spaces preserved.
Shrink The box will be moved or resized within surrounding empty space and if required, the next or previous boxes will be shifted and their empty spaces shrunk
Slip The next or previous boxes will be shifted, all empty spaces will be preserved, including the adjacent. If there is fixed box, all the boxes will be moved next to the fixed box.
All Also fixed boxes (except Bound) will be shifted if required, for Shift/Shrink/Slip
Single When there are more adjacent boxes without space, the surrounding space will be taken as none, especially for Shift and Slip
If not present, the surrounding space is taken as the nearest space
Append When dragged to box end, attaches it to the box without space as adjacent – the boxes will be joined.
Error The box will be moved or resized even if there is no room for it. In this case it will be marked as error. See also GanttRunError.
Resize The box will be resized if there is no room for it
Move The box will be moved left if there is no room for it (also shifting boxes on left side by Shift/Shrink/Slip will be permitted)
Zoom (new 7.0) When copying/moving between grids, the box will preserve its width on screen and its physical width will be changed by zoom ratio of the grids.
There are also attributes read when dragging with appropriate shift key and for specific GanttRunMove / GanttRunResize actions:
GanttRunAdjustCtrl, GanttRunAdjustAlt, GanttRunAdjustShift
GanttRunAdjustResize, GanttRunAdjustResizeCtrl, GanttRunAdjustResizeAlt, GanttRunAdjustResizeShift
GanttRunAdjustSlide, GanttRunAdjustSlideCtrl, GanttRunAdjustSlideAlt, GanttRunAdjustSlideShift
GanttRunAdjustMove, GanttRunAdjustMoveCtrl, GanttRunAdjustMoveAlt, GanttRunAdjustMoveShift
GanttRunAdjustCopy, GanttRunAdjustCopyCtrl, GanttRunAdjustCopyAlt, GanttRunAdjustCopyShift
GanttRunAdjustRemove, GanttRunAdjustRemoveCtrl, GanttRunAdjustRemoveAlt, GanttRunAdjustRemoveShift
If the exact attribute is not set, the universal one is used, e.g. the attributes are read in this order: GanttRunAdjustMoveCtrlRight, GanttRunAdjustMove, GanttRunAdjustCtrlRight, GanttRunAdjust
Since 7.0 there are adjust actions for other mouse buttons (Right and Middle) as the last suffix like GanttRunAdjustRight, GanttRunAdjustCtrlRight, GanttRunAdjustResizeRight, GanttRunAdjustResizeCtrlRight, ...
Since 7.0 for touch screens (iPAD) are available events for count of fingers on pad, GanttRunAdjust1, GanttRunAdjust2, GanttRunAdjust3, GanttRunAdjustResize1, GanttRunAdjustResize2, ..., but not all the prefixes are used by default, for more information see the touch postfixes for GanttRunResize and GanttRunMove.
<C> <cell> string[] GanttRunAdjustStart [“Slip”] new 7.0.
Adjust settings used when changed GanttRunStart value.
The supported keywords are empty, Shift, Shrink, Slip, All, Single
For their meaning see GanttRunAdjust.
<C> <cell> string[] GanttRunAdjustCorrect [“Slip”] new 7.0.
Adjust settings used when moving run during correcting dependencies. Used also when moving GanttSummary children.
The run never resizes during correcting, it means that its duration and also difference between end and start will not change.
The moving is done by trying to move the first box and the last box independently according to the Adjust setting and if the changes differ, the smaller change is applied.
The supported keywords are empty, Shift, Shrink, Slip, All, Single
For their meaning see GanttRunAdjust.
<C> bool GanttRunCorrectFixed [0] new 7.0.
Used when correcting dependencies. For 1 it will check the run moving possibility like any other constraints.
The checking can slow down the correcting.
The checking should be used when the runs contain fixed boxes (Fixed, Left, Right, Stop, Bound).
<C><cell> string[][] GanttRunNew [1,Box] new 6.1; upd 7.0.
One or more boxes that will be created when adding new box to the run, by dragging empty space
It has the same format as GanttRun.
If it contains more boxes, the last one will be resized a user while adding the boxes.
Set it to empty string to forbid adding new boxes.
There are also attributes read when dragging with appropriate shift key: GanttRunNewCtrl, GanttRunNewAlt, GanttRunNewShift
Since 7.0 there are also attributes for other mouse buttons (Right and Middle) as the last suffix: GanttRunNewRight, GanttRunNewCtrlRight, GanttRunNewAltRight, GanttRunNewShiftRight, GanttRunNewMiddle, GanttRunNewCtrlMiddle, GanttRunNewAltMiddle, GanttRunNewShiftMiddle
Since 7.0 for touch screens (iPAD) are available events for count of fingers on pad, GanttRunNew1, GanttRunNew2, GanttRunNew3, ..., but because by default in Defaults.xml is the NewGanttRun action attached only to OnDrag3Gantt event, these prefixes are ignored. To use them, you need to attach the NewGanttRun to appropriate OnDragXGantt event.
<C><cell> string[][] GanttRunNewStart [1,Box] new 6.1; upd 7.0.
Setting GanttRunNew when adding new box to the empty run, by dragging empty space.
It can contain also some start or end box.
For more information see GanttRunNew.
<C><cell> string[][] GanttRunTypes [ ] new 6.1 .
List of predefined types of the boxes to select from popup menu, it has the same format as GanttRun except there is the type name (shown in menu) instead of width as the first item and no start/end items
The empty values are ignored.
Used to let a user to change the type and class of clicked box from popup menu
For example: “type1,,,Red;type2,,,Blue;type3,solid,xxx,White”
<C> <cell> string[] GanttRunError [ “Sort” ] new 6.2; chg 7.0.
How will be the error boxes handled. Comma separated list of flag keywords, case insensitive.
Sort The boxes will be sorted by their start positions, after any change. Sorts errors also on start. It is default value since 7.0.
Merge (new 7.0) The overflowed boxes will be merged to one (the first box will be resized to the width of all the boxes and the rest boxes will be deleted).
It merges only boxes of type Box and Solid. All other boxes are still marked as error. The Merge always does Sort too.
API event bool OnGanttRunDrop (TGrid grid, TRow row, string col, bool drop, object src, int index, string keyprefix, int x, int y, TGrid togrid, TRow torow, string tocol, int cellx) new 6.1; upd 7.0.
Called during dragging and also when the dragged run box(es) is dropped. It is called also when it is dropped outside any grid.
It is called only for GanttRunMove=’Move/Copy/Remove’
grid, row, col is source run from that is dragged.
drop is false when called during dragging to check if the box can be dropped and true when the box is being dropped.
src is parsed run that is dragged – two dimensional array of the dragged boxes.
index is RunIndex of the dragged box inside its source cell (not in src), if more boxes are dragged together, this is index of the one that was caught by mouse.
keyprefix is prefix of shift keys: “Ctrl”, “Alt”, “Shift” and (since 7.0) also mouse button “Right” or “Middle”. The key is before the mouse, e.g. keyprefix=’CtrlRight’
x, y is mouse position in page in time of drop, in pixels.
togrid, torow, tocol is destination cell to that is dropped. It can be null if dropped outside any grid
cellx is drop position inside the destination cell, in pixels.
Return false to suppress drop
API method object GetGanttRun (TRow row, string col) new 6.1; chg 7.0.
Returns parsed GanttRun value for given Gantt cell.
Returned object is two dimensional array with the parsed boxes in format: [[width,type,text,class,tip,id,group], [width,type,text,class,tip,id,group], ... ]
If the boxes are not joined, every even item is Empty type box.
The width (first item) is in pixels milliseconds
and without excluded parts. The type (second item) is always set. In 7.0 the
width units were changed from pixels to milliseconds.
It contains also property Start as left position (in pixels) from the cell left edge. Regardless on the first box is start End/Bound type or not.
API method object SetGanttRun (TRow row, string col, object run) new 6.1; chg 7.0.
Writes parsed GanttRun into the Run source cell value for given Gantt cell.
The run must be the object returned from GetGanttRun! Never create new run object!
You can get the run object by GetGanttRun, modify its individual boxes and / or Start property and set it back by SetGanttRun. Never create new run object!
In 7.0 the width units were changed from pixels to milliseconds.
API method object GetGanttRunBox (TRow row, string col, int index) or (TRow row, string col, string id, string group=null) new 7.0; upd 7.1.
Returns given box from the Gantt Run cell. Returns null if there is no such box.
The cell can be identified by number index or by string id, optionally with string group. The id can be number, but must be in string type variable.
Returns object with these properties:
int Index – index of the box inside its Run
int Start – start date in milliseconds
int End – end date in milliseconds, it is affected also by GanttEndLast value
int Length – box duration in milliseconds, without excluded dates
int Left – left side position in chart in pixels, including excluded dates and is affected by zoom
int Width – width of the box in chart in pixels, including excluded dates and is affected by zoom
string Type, string Class, string Tip, string Id, string Group, string State – attributes set for the box
TRow Row, string Col – parameters given to the function
(new 7.1) object[] Data – raw box data array (always starting by Width) for access also custom box attributes
API method bool SetGanttRunBox (object box, string adjust) new 7.0 .
Changes given box. Shows changes in the cell. If the box does not exist, returns false, otherwise true.
The box must have set the Row + Index or Id (+Row+Group) attribute to identify it.
adjust is the way how other boxes will be moved when the box position or size is changed, comma separated list of keywords, see GanttRunAdjust.
To change box size you should set only some position attributes: Start+End or Start+Length or End+Length or Left+Width.
If you have box got by GetGanttRunBox and you want to change the Left or Width, you must null its Start, End and Length attributes.
API method bool AddGanttRunBox (object box, string adjust, string id=null, string group=null) new 7.0 .
Adds the box to the run. If set id and group, adds it before the box with the given id+group or id as number index. If no such box, adds it to the end.
If the box does not exist, returns false, otherwise true.
API method bool DelGanttRunBox (object box) new 7.0 .
Deletes given box. Shows changes in the cell. If the box does not exist, returns false, otherwise true.
The box must have set the Index or Id (Group) attribute to identify it.
Remember, if you are deleting more boxes found by FindGanttRunBoxes, you must iterate the array from end, to not break down the box indexes!
API method object ScrollToGanttRunBox (object box, int type = 0) new 7.0 .
Scrolls the box into view.
The box must have set the Index or Id (Group) attribute to identify it.
type is 0 for the smallest scroll, 1 to show the box on the left, 2 to show the box centered.
API method object GetGanttRunBoxTag (object box) new 7.0 .
Returns outer HTML tag of the given box.
The box must have set the Index or Id (Group) attribute to identify it.
It can be used to mark the box by changing its className or inline style or its firstChild className or inline style.
It should not be used to change box position or size.
API method object[] FindGanttRunBoxes (object box, int type = 0) new 7.0 .
Searches grid for boxes with the same attributes as the given box.
Returns array of the objects, the objects are the same as from GetGanttRunBox method.
Only these attributes are searched for: Id, Group, Type, Text, Class and Tip.
If the box contains Row property, searches only within this row.
type&1 = 1 – without not expanded children, type&2 = 2 – only visible rows,
type&4 = 4 – case insensitive search, type&8 = 8 – returns also boxes that contain given string(s)
type&16=16 – searches only editable runs (GanttEdit=’run’)
API event bool OnGanttRunBoxChanged (TGrid grid, object box, object old) new 7.0 .
Called after change in any Run box, before the changes are displayed.
It is called only when set GanttRunStates=”1”. It is called only for box with Id set.
The box is actual box settings like returned by GetGanttRunBox. The box is null for deleted box. It has already set its new State.
The old is original box settings before change. The old is null for added box. For deleted box it has set State=”deleted”, otherwise the original state.
When box is moved from one row to another, the event is called twice, first for adding the box to new row and next for deleting the box from old row.
If defined this event, all newly created boxes (except bounds and empty) get generated new id “new”+temp index.
Return true if you changed some parameter in box to save the change.
API event bool OnGanttRunBoxNew (TGrid grid, object box, bool copy) new 7.0 .
Called after new box was created by dragging or the box was copied by dragging with GanttRunMove=’Copy’.
copy is 1 if the box was copied, 0 if it was created new. The copied box has still its original Id (duplicate), so you should change it here.
If defined OnGanttRunBoxChanged, this event is called before OnGanttRunBoxChanged and the new box has already set its id “newXXX”
The box is actual box settings like returned by GetGanttRunBox.
Return true if you changed some parameter in box to save the change.
<Actions> MoveGanttRun Attached to OnDragGantt, cannot be attached anywhere else new 7.0 .
Moves one run box by mouse dragging according to GanttRunMove and GanttRunAdjust settings
Fails, if mouse is not above run box or the run box is fixed.
<Actions> ResizeGanttRun Attached to OnDragGantt, cannot be attached anywhere else new 7.0 .
Moves one run box by mouse dragging according to GanttRunResize and GanttRunAdjust settings
Fails, if mouse is not above run box edge or the run box is solid or its edge is fixed.
<Actions> CreateGanttRun Attached to OnDragGantt, cannot be attached anywhere else new 7.0 .
Creates new run box by mouse dragging according to GanttRunNew, GanttRunResize and GanttRunAdjust settings.
Fails, if run box cannot be created here
<Actions> DeleteGanttRun Not attached to any event new 6.1 .
Deletes one run box under mouse cursor
It fails if there is no run box under mouse cursor.
<Actions> DeleteGanttRunGroup Not attached to any event new 7.0 .
Deletes all boxes in actual row that have the same Group value as the box under mouse cursor
<Actions> DeleteGanttRunGroupAll Not attached to any event new 7.0 .
Deletes all boxes in the whole grid that have the same Group value as the box under mouse cursor
<Actions> DeleteGanttRunAll ...F Not attached to any event new 7.0 .
Deletes all boxes in the whole grid that have the same Group value as the box under mouse cursor
<Actions> EditGanttRun Attached to OnDblClickGantt event new 6.1 .
Lets a user to edit text shown on the run box under mouse cursor.
<Actions> EditGanttRunTip Not attached to any event new 6.1 .
Lets a user to edit text shown as tooltip for the run box under mouse cursor.
<Actions> ChooseGanttRunType Not attached to any event new 6.1 .
Lets a user to choose type of the run box under mouse cursor. The possible run types are defined by GanttRunTypes.
<Actions> ChooseGanttRunGroupType Not attached to any event new 7.0 .
Lets a user to choose type of all boxes in the actual row with the same Group value as box under mouse cursor. The possible run types are defined by GanttRunTypes.
<Actions> ChooseGanttRunGroupAllType Not attached to any event new 7.0 .
Lets a user to choose type of all boxes in the whole grid with the same Group value as box under mouse cursor. The possible run types are defined by GanttRunTypes.
<Actions> SetGanttRunPercent Attached to OnCtrlRightClickGantt event new 7.0 .
Changes % of completed to position under mouse cursor.
It fails if mouse is not above Run bar.
<Actions> EditGanttRunPercent Attached to OnShiftRightClickGantt event new 7.0 .
Lets a user to edit percentage completion of the run set by GanttRunComplete.
<Actions> EditGanttRunText Not attached to any event new 7.0 .
Lets a user to edit the text for whole task in GanttRunText
<Actions> NewGanttRunMilestone Attached to OnDblClickGantt event new 7.0 .
Adds new Run box with zero width and type Milestone. There can be more milestones defined by Run in one cell.
<Actions> NewGanttRunStop Attached to OnDblClickGantt event new 7.0 .
Adds new Run box with zero width and type Stop (not movable milestone). There can be more milestones defined by Run in one cell.
formula int ganttrunmaxend (string ganttcol) new 6.1 .
Calculates maximal end date (in milliseconds) of all child Runs.
Used to get Run range of child Runs and show it as Main Bar.
ganttcol – column showing the Gantt chart, it should contain the Run bars.
Example: <I Calculated="1" CalcOrder="GGanttStart,GGanttEnd" GGanttStartFormula="ganttrunminstart('G')" GGanttEndFormula="ganttrunmaxend('G')"/>
formula int ganttrunend (string ganttcol) new 6.2 .
Calculates end date (in milliseconds) of one Run.
ganttcol – column showing the Gantt chart, it should contain the Run bars.
formula int ganttrunminstart (string ganttcol) new 6.2 .
Calculates minimal start date (in milliseconds) of all child Runs.
Used to get Run range of child Runs and show it as Main Bar.
ganttcol – column showing the Gantt chart, it should contain the Run bars.
Example: <I Calculated="1" CalcOrder="GGanttStart,GGanttEnd" GGanttStartFormula="ganttrunminstart('G')" GGanttEndFormula="ganttrunmaxend('G')"/>
formula int ganttrunstart (string ganttcol) new 6.2 .
Calculates start date (in milliseconds) of one Run.
ganttcol – column showing the Gantt chart, it should contain the Run bars.
formula int ganttrunduration (string ganttcol) new 7.0 .
Calculates duration of the run, without empty spaces and start/end boxes.
Returns value in GanttDataUnits.
ganttcol – column showing the Gantt chart, it should contain the Run bars.