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.