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

Resize Gantt

Thread ID:

Created:

Updated:

Platform:

Replies:

118037 Jan 22,2015 07:45 PM UTC Jan 27,2015 09:15 AM UTC ASP.NET Web Forms 5
loading
Tags: Gantt
Otto Moura Machado Filho
Asked On January 22, 2015 07:45 PM UTC

I had no success on resizing Gantt.

I would like to set height and width for Gantt when the browser resizes.

I tried this:

for javascript:
$(document).ready(function () {
        $(window).bind('resize', function () {
            $("#myGantt").ejGantt(
            {
                sizeSettings: { height: "900px", width: "1200px" }
            });
        }).trigger('resize');
    });


On my view I have this:

@(Html.EJ()
    .Gantt("myGantt")
    .SizeSettings(grid =>
    {
        grid.Height("500px");
        grid.Width("1500px";
    })

The code above didn't work.

Tried to put Gantt inside a div too with the same id but didn't work too.

How can I do this?

Regards,
Otto Machado.

John Rajaram [Syncfusion]
Replied On January 23, 2015 11:20 AM UTC

Hi Otto,

Thanks for using Syncfusion products.

We would like to let you know that, we can resize our Gantt control by using the EnableResize property.

Please refer the below code snippets for more details.

Code snippets:

<head>

   //...

   <style>

        /*we have to set height and width for resizing Gantt dynamically*/

        #Gantt

        {

            position:absolute;

            height:100%;

            width:100%;

        }

   </style>

</head>

<body style="position: static; margin: 0px; padding: 0px">

@(Html.EJ().Gantt("Gantt").

    //...

   .EnableResize(true)

   .SizeSettings(eve =>

       {

           eve.Height("900px");

           eve.Width("1200px");

      

       })

   .Datasource(ViewBag.dataSource)

  )

@(Html.EJ().ScriptManager())

 

We have also prepared a sample based on this for resizing Gantt and you can find the sample under the following location:

Sample: http://www.syncfusion.com/downloads/support/directtrac/118037/MVC09NewSampleResize922105385.zip

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

Regards,
John. R



Otto Moura Machado Filho
Replied On January 23, 2015 01:38 PM UTC

Thanks, it worked.

Just one more question. How can i set the initial position of the SplitDivider (that divides the grid from chart). It has about 300px of width, I'd like to set a higher value.

Regards,
Otto Machado.

Bharath Marimuthu [Syncfusion]
Replied On January 26, 2015 06:21 AM UTC

Hi Otto,

Thank you for the update.

We have created a new incident #134442 on behalf of you related to this forum. We suggest you to follow up the incident for further reference using your direct-trac account.

Our Direct Trac support system can be accessed from the following link:

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

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

Thanks,

Bharath



Otto Moura Machado Filho
Replied On January 26, 2015 04:13 PM UTC

Ok. I'll wait for it.

Regards,
Otto Machado.

John Rajaram [Syncfusion]
Replied On January 27, 2015 09:15 AM UTC

Hi Otto,
 
Thanks for the update.
Please let us know if you require further assistance on this.
 
Regards,
John R



CONFIRMATION

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

or the page will be automatically redirected to 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

;