We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Disable the re sizing of gantt bar

Hi I am using Gantt Chart! I want to disable the resizing of gantt bar ! I know that we can do with makingallowGanttChartEditing as false but i want it as true and disable gantt bar.. Is there any option to do this! Thank You

1 Reply

MK Mahalakshmi Karthikeyan Syncfusion Team August 26, 2015 07:11 AM UTC

Hi Gitesh,

Thanks for using Syncfusion product.

For your kind information, it is possible to disable the Gantt Task bar resize alone using “taskBarEdited” client side event. Please refer the below code snippet for details.

<div id="gantt"></div>   

<script type="text/javascript"> 

$("#gantt").ejGantt({

//…

taskbarEdited: taskbarEdited

});

        function taskbarEdited(args) {

            if (args.leftResizing || args.rightResizing || args.dragging)

                args.cancel = true;

        }

</script>

“taskBarEdited” event will be fired when the action get completed.

We can also use “taskBarEditing” client side event which fires when we start to edit any task bar. Please refer the below code snippet for details.

<div id="gantt"></div>   

<script type="text/javascript"> 

$("#gantt").ejGantt({

//…

taskbarEditing: taskbarEditing

});

        function taskbarEditing(args) {

              //...

              args.cancel = true;


        }

</script>

We have also prepared a sample based on this and you can find the sample under the following location.

Sample: http://jsplayground.syncfusion.com/Sync_fevgbosl

Currently we are facing some issue that we cannot prevent the parent task bar from resizing which gets updated while resizing the particular child taskbar using “taskBarEdited”. Hence we have logged an issue report regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Please let us know if you require further assistance on this.      

Regards,

Mahalakshmi K.


Loader.
Live Chat Icon For mobile
Up arrow icon