Articles in this section
Category / Section

How to make a taskbar draggable but not resizable

1 min read

In the Gantt, it is possible to allow only the drag and drop action on the taskbar and to restrict the resizing action(Left/Right/Progress) on the taskbar. This can be done by using the taskbarEditing client-side event. The taskbarEditing event will be triggered when dragging and resizing the taskbar in the Gantt chart. Please refer the following code example for this.

<script type="text/javascript">
      $(function () {
          $("#GanttContainer").ejGantt({
                dataSource: defaultGanttData,
                taskIdMapping: "TaskID",
                taskbarEditing: function (args) {
                     if (args.leftResizing == true || args.rightResizing == true || args.progressResizing == true)
                          args.cancel = true
                 },
                //..
      });
   });
</script>
 

Sample:

A sample to make a taskbar draggable but not resizable in the Gantt is available here.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied