TreeGrid v7.0

Gantt popup menu

TreeGrid documentation index

 

 

<C> <cell>       string [*] GanttMenu      [...]                                                                                                     new 7.1       .

Defines all items in right click popup menu in the Gantt column for given cell or whole column

It can be first character separated array of menu item names. The items can contain any HTML code. Separator can be shown as item named ‘-‘

Or it can be in standard TreeGrid menu format as complex menu with sub levels, sub menus, columns and so on.

See also API ShowMenu function to show custom menu from JavaScript.

 

It is possible to change the order or remove some items.

You can also add new custom items and define OnGanttMenuClick API event to be called on click to the custom item.

 

The predefined menu item texts are defined in Text.xml, in <Lang><Gantt></Lang>.

Default Gantt menu is defined in Defaults.xml, in <D Name=”Gantt” ... /> and contains all these items in this order:

 

Item name used in GanttMenu       Text defined in Text.xml                  When shown and notes

DelGanttConstraint                           Delete %d constraint                          Shown on constraint and constraints are editable

SplitGanttConstraint                         Split the %d constraint                      Shown on mandatory constraint and constraints are editable

ChangeGanttConstraint                   Set the constraint as %d                    Shows up to four items to change to all possible constraints. Shown on constraint and constraints are editable

DelGanttFlag                                       Delete the flag                                     Shown on flag and flags are editable

EditGanttFlag                                     Enter the flag text                               Shown on flag and flags are editable and the GanttFlagTexts column is defined

ChooseGanttFlagIcon                       Select the flag icon                             Shown on flag and flags are editable and the GanttFlagIcons column is defined

DelGanttPoint                                     Delete the point                                   Shown on point and points are editable

DelGanttFlowPart                              Delete the real flow bar                     Shown on flow bar and the flow is editable

                                                               Delete milestone                                 Shown on flow milestone and the flow is editable

SetGanttFlowPercent                         Update completed status here         Shown on flow and the flow is editable and the GanttFlowComplete is defined

EditGanttFlowPercent                       Enter completed status                      Shown on flow and the flow is editable and the GanttFlowComplete is defined

EditGanttFlowText                            Enter the real flow information       Shown on flow and the flow is editable and the GanttFlowText column is defined

DelGanttMilestone                             Delete milestone                                 Shown on milestone, the main bar is editable and GanttSummary is not 1

SetGanttMilestone                             Set the milestone complete              Shown on incomplete milestone, the main bar is editable, GanttSummary is not 1 and GanttComplete column is defined

                                                               Set the milestone incomplete           Shown on complete milestone, the main bar is editable, GanttSummary is not 1 and GanttComplete column is defined

DelGanttMain                                     Delete main bar                                  Shown on main bar, the main bar is editable and GanttSummary is not 1

SetGanttPercent                                 Update completed status here         Shown on main bar, the main bar is editable, GanttSummary is not 1 and GanttComplete column is defined

EditGanttPercent                                Enter completed status                     Shown on main bar, the main bar is editable, GanttSummary is not 1 and GanttComplete column is defined

EditGanttText                                     Enter the main bar information      Shown on main bar or milestone, the main bar is editable and GanttText column is defined

DelGanttRunPart                               Delete the box                                     Shown on run bar except End/Bound and the run is editable

EditGanttRun                                     Change the box text                          Shown on run bar except End/Bound and the run is editable

EditGanttRunTip                               Change the box information           Shown on run bar except End/Bound and the run is editable

ChooseGanttRunType                      Select the box type                            Shown on run bar except End/Bound and the run is editable

-             

DelGanttRunGroup                           Delete row group (%d boxes)           Shown on run bar except End/Bound and the run is editable. Only if there are more boxes with the same Group attribute as this box in the same row

DelGanttRunGroupAll                      Delete group (%d boxes)                   Shown on run bar except End/Bound and the run is editable. Only if there is a box with the same Group attribute as this box in another row

ChooseGanttRunGroupType          Select row group type (%d boxes) Shown on run bar except End/Bound and the run is editable. Only if there are more boxes with the same Group attribute as this box in the same row

ChooseGanttRunGroupAllType     Select group type (%d boxes)          Shown on run bar except End/Bound and the run is editable. Only if there is a box with the same Group attribute as this box in another row

-

SetGanttRunMilestone                     Set the milestone complete              Shown on incomplete run Milestone or Stop, the run is editable, GanttRunComplete column is defined. Only if the run contains only the box.

                                                               Set the milestone incomplete           Shown on complete run Milestone or Stop, the run bar is editable, GanttRunComplete column is defined. Only if the run contains only the box.

SetGanttRunPercent                          Update completed status here         Shown on run bar, the run is editable, GanttRunComplete column is defined. Except the run contains the only milestone.

EditGanttRunPercent                        Enter completed status                     Shown on run bar, the run is editable, GanttRunComplete column is defined. Except the run contains the only milestone.

EditGanttRunText                             Enter the task information               Shown on run bar, the run is editable, GanttRunText column is defined.

-

EditGanttResource                            Change resources                               Shown if resources are editable and GanttResources column is defined

GanttDepLagChange                        Change lag of line to %d                  Shows more items, one item per one outgoing dependency. Shown if dependency lags are editable.

Change lag of line from %d            Shows more items, one item per one incoming dependency. Shown if dependency lags are editable.

-

DelGanttDep                                       Disconnect line to %d                       Shows more items, one item per one outgoing dependency. Shown if dependencies are editable.

                                                               Disconnect line from %d  Shows more items, one item per one incoming dependency. Shown if dependencies are editable.

DelAllGanttDep                                  Disconnect all dependency lines     Shown if there is some incoming/outgoing dependency

DelGanttMainDep                             Delete main bar and dependencies Shown if there is some incoming/outgoing dependency and the GanttObject bar (main or flow or run) that is editable

Delete milestone and dependencies               Shown if there is some incoming/outgoing dependency and milestone and the main bar is in the GanttObject and the main bar is editable

DelGanttMainBar                              Delete main bar                                  Shown if there is main bar and the main bar is editable

DelGanttFlow                                      Delete real flow                                   Shown if there is flow bar and the flow is editable and GanttFlowComplete column is not defined

                                                               Delete main bar                                  Shown if there is flow bar and the flow is editable and GanttFlowComplete column is defined

DelGanttRun                                       Delete all boxes in row                      Shown if there is run bar and the run is editable and GanttRunComplete column is not defined

Delete main bar                                  Shown if there is run bar and the run is editable and GanttRunComplete column is defined

DelGanttFlags                                     Delete all flags                                    Shown if there is some flag and the flags are editable

DelGanttPoints                                   DelGanttPoints                                   Shown if there is some editable point

DelGanttConstraints                          Delete all constraints                         Shown if there is some constraint and the constraints are editable

DelGanttAll                                         Clear the gantt cell                             Shown if there is any object in the cell that can be deleted

-

NewGanttFlag                                     Add new flag to selected point        Shown if there is no flag under mouse, the flags are editable, GanttFlags column is defined and the adding does not violate constraints

NewGanttPoint                                   Add new point to selected point      Shown if it is possible to add new point here

NewGanttConstraint                         Add %d constraint here                    Shows up to six items for every constraint that can be added to this place

NewGanttMilestone                           Add new milestone here                    Shown if there is neither main bar nor milestone, the main bar is editable, GanttStart column is defined and the adding does not violate constraints

NewGanttEndMilestone                   Add new ending milestone here       Shown if there is neither main bar nor milestone, the main bar is editable, GanttEnd column is defined and the adding does not violate constraints

NewGanttFlowMilestone Add new milestone here                    Shown if there is no flow bar under mouse, the flow is editable, GanttFlowComplete is defined and the adding does not violate constraints

NewGanttFlowEndMilestone           Add new ending milestone here       Shown if there is no flow bar under mouse, the flow is editable, GanttFlowComplete is defined and the adding does not violate constraints

NewGanttRunMilestone                   Add new milestone here                    Shown if there is no run bar under mouse, the run is editable, GanttRun column is defined, GanttRunMilestones=1 and the adding does not violate constraints

NewGanttRunStop                            Add new stop here                             Shown if there is no run bar under mouse, the run is editable, GanttRun column is defined, GanttRunMilestones=1 and the adding does not violate constraints

-

SetGanttBase                                      Set project baseline here                   Shown on computed baseline (if GanttBase is empty) and GanttBaseCanEdit is set

DelGanttBase                                     Delete project baseline                      Shown on baseline (if GanttBase is not empty) and GanttBaseCanEdit is set

SetGanttFinish                                    Set project finish here                        Shown on computed finish line (if GanttFinish is empty) and GanttFinishCanEdit is set

DelGanttFinish                                    Delete project finish                           Shown on finish line (if GanttFinish is not empty) and GanttFinishCanEdit is set

CorrectRelatedDependencies          Correct related dependencies           Shown if there is some dependency error in the group related to this task

CorrectAllDependencies                   Correct all dependencies in chart    Shown if there is some dependency error in chart

 

Any other item name is custom name and its click must be handled by OnGanttMenuClick API event.

 

API event         string    OnGetGanttMenu    (TGrid grid, TRow row, string col, string menu, object GanttXY)            new 7.1 .

Called to get the popup GanttMenu attribute dynamically by JavaScript.

menu is the original menu for the cell with all default and custom values. It should return new menu string.

GanttXY is object returned by GetGanttXY method and contains information about the Gantt bar(s) under mouse cursor.

 

API event         bool      OnGanttMenu            (TGrid grid, TRow row, string col, TMenu Menu, object GanttXY)            new 6.1 .

Called before the Gantt popup menu is displayed for the appropriate cell.

Menu is TreeGrid JavaScript TMenu object, here can be changed, items modified, added or deleted and so on.

GanttXY is object returned by GetGanttXY method and contains information about the Gantt bar(s) under mouse cursor.

Return true to cancel showing menu.

 

API event         void      OnGanttMenuClick            (TGrid grid, TRow row, string col, string name, TMenuItem Item, object GanttXY)   new 7.1 .

Called when a user clicks to custom item in GanttMenu.

name is clicked item Name, Item is the whole clicked item object

GanttXY is object returned by GetGanttXY method and contains information about the Gantt bar(s) under mouse cursor in time of the menu display.

 

<Actions>                    GanttMenu     Attached to OnRightClickGantt event                                                              .

Shows popup menu with available actions for given clicked point in the Gantt cell.

 

<C> <cell>       string [*] Menu        [...]                                                                                                                 chg 6.0       .

For compatibility with 6.x and 7.0 version only. In 7.1+ version use GanttMenu attribute instead.

Context (popup) menu for the Gantt cell to add custom items to the default Gantt menu.