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

How to set the column widths on Gantt chart?

I'd like to set the widths of the Gantt chart columns - is there a way to do that?

1 Reply

JD Jayakumar Duraisamy Syncfusion Team May 1, 2017 07:32 AM UTC

Hi Mark, 
 
Please find the below response. 
 
We can set the Gantt columns width at the load time using “load” client side event. 
Please refer the following code snippet, 
<ej-gantt id="ganttSample" datasource="ViewBag.datasource" 
//… 
load:"loadEvent"> 
</ej-gantt> 
<script type="text/javascript"> 
function loadEvent(args) { 
       var columns = this.getColumns(); 
           columns[0].width = 100; 
           columns[1].width = 250; 
           columns[2].width = 250; 
} 
 
Please let us know if you need any other assistance. 


Loader.
Up arrow icon