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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to refresh component to fill parent div?

Thread ID:





131488 Jul 12,2017 12:45 PM UTC Jul 17,2017 04:07 AM UTC JavaScript 3
Tags: ejGantt
Mark Chidlow
Asked On July 12, 2017 12:45 PM UTC

I would like to force a refresh/redraw of a Gantt Chart component to expand to fill the parent div (100%). Is there a method I can call to refresh the component to do this?

The scenario is that I have the component inside the body of a Bootstrap accordian (http://getbootstrap.com/javascript/#collapse-example-accordion) where it defaults to collapsed. When I show the panel the component has not expanded to fit it. If on opening I set the component width it makes no difference.


Jayakumar Duraisamy [Syncfusion]
Replied On July 13, 2017 01:21 PM UTC

Hi Mark, 
In Gantt, we have a public method call windowResize, it will update resize the Gantt element by its parent element width & height. Hence, we can call this method once after Bootstrap accordion of Gantt control opened. 
Please refer following code snippet, 
$('#accordion').on('shown.bs.collapse', function (e) {                         
            var $target = e.target; 
            if ($target.id == "collapseTwo") { 
                var ganttObj = $("#GanttContainer").ejGantt("instance"); 
We have also prepared a sample for your reference. Please refer following sample link, 
Please let us know, if you require any other assistance. 
Jayakumar D 

Mark Chidlow
Replied On July 14, 2017 02:29 PM UTC

Perfect - that is exactly what I need.

The sample you provided is excellent and is perfect for my scenario.

Again the level of support Syncfusion provides is second-to-none. Thank you.

Jayakumar Duraisamy [Syncfusion]
Replied On July 17, 2017 04:07 AM UTC

Hi Mark, 
We are glad that your requirement has been met. Please let us know if you need any other assistance. 
Jayakumar D 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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