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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to update the dimensions for Gantt at run time

Platform: ASP.NET MVC |
Control: Gantt

In Gantt control, the dimensions of the Gantt chart can be changed using the sizeSettings.height and sizeSettings.width properties. The height and width values can be provided in both pixels and percentage values.

To update the dimensions of the Gantt during run time, the following code snippets can be used.

<button id="resizeGantt" style="display:block">Resize Gantt</button>
.SizeSettings(st =>
//Updating the height and width of Gantt through button click
$("#resizeGantt").click(function () {
var ganttObj = $("#GanttSample").data("ejGantt");
if (ganttObj.model.sizeSettings.height == "450px")
ganttObj.setModel({ "sizeSettings": { height: "300px", width: "70%" } });
ganttObj.setModel({ "sizeSettings": { height: "450px", width: "100%" } });

Sample link

A sample for updating the dimensions of Gantt chart is available in the following link. Sample



2X faster development

The ultimate ASP.NET MVC UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile