Unplanned
Last Updated: 04 Aug 2021 08:48 by ADMIN
Vedad
Created on: 04 Aug 2021 08:48
Category: Gantt
Type: Feature Request
0
Expose public method for showing/hiding the planned tasks in Gantt

I would like to be able to toggle the planned vs actual view on Gantt outside of the Gantt toolbar. This can be achieved using private methods as in the example below and the Dojo linked here:

```

function changeValue(){
          var gantt = $('#gantt').data('kendoGantt')
          var timeline = gantt.timeline;

          var showPlanned = $('#gantt input.k-gantt-planned-switch').data('kendoSwitch').check()
          $('#gantt input.k-gantt-planned-switch').data('kendoSwitch').check(!showPlanned)

          gantt.wrapper.toggleClass("k-gantt-planned");
          timeline._setPlanned(!timeline.options.showPlannedTasks);
          timeline._render(gantt.dataSource.taskTree());
          timeline._renderDependencies(gantt.dependencies.view());
 }

```

However, having a public method for showing the planned tasks (for example showPlannedTasks(true) ) would be very helpful.

                    
0 comments