can't control width of contents inside 'view'

6 posts, 0 answers
  1. BRAD
    BRAD avatar
    27 posts
    Member since:
    May 2012

    Posted 10 May 2015 Link to this post

    I'm using a Gantt object on one of my sites, but for some reason my day/week/month views are all scrunched up more than they need to be.  I have plenty of whitespace to the right inside the entire gantt object, but the view isn't stretching out to fill it.  I see there is a 'listwidth' option to change the width of the left section, but nothing for the right.  What can i do to fix this?
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 11 May 2015 Link to this post

    Hi,

    By default the gantt widget will try to occupy the whole width of the container in which it is placed and the treelist part is set to be 30% of this available width.  If the width of the gantt widget is too small, please check the size of the wrapping element and increase it accordingly. 

    Regards,
    Dimitar Terziev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. BRAD
    BRAD avatar
    27 posts
    Member since:
    May 2012

    Posted 11 May 2015 in reply to Dimitar Terziev Link to this post

    thanks, but it's not actually the gantt container that's the problem (i believe) since that does fill out 100% of the width.  It's the view contents that are at issue.  See the attached images.  week.png looks fine, but month.png is all scrunched up and doesn't take up the entire width of the gantt object.  
  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 13 May 2015 Link to this post

    Hi,

    The experience behavior is the expected one. The gantt widget renders time slots for the longest task with few slots prior to the task start as well as slots after the task end. If the time line part is longer than the width of these slots, there is a gap which is observed on our online demos as well. You could control the size of the time slots via the slotSize property. 

    Regards,
    Dimitar Terziev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. BRAD
    BRAD avatar
    27 posts
    Member since:
    May 2012

    Posted 13 May 2015 in reply to Dimitar Terziev Link to this post

    I can probably live with that, except for the fact that in the month view at least there are the columns to the left and right that aren't obeying the slotsize values.  See this image again, where i've set the slotsize to 120.  For some reason the first and last columns are scrunched up.
  7. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 15 May 2015 Link to this post

    Hello,

    Each slot is in fact a table header with specific colspan. When the gantt widget renders its headers a calculation is performed how much headers to be rendered depending on the time range of the gantt tasks. In your case there are six headers, the first and the last have colspan of 1, and the four in between have colspan of 4. If you inspect the dom elements, the first and the last header should have width of 30px since the total width is 120px divided by 4 since the maximum colspan is four and they have colspan of 1.

    In case this is not the case I would like to ask for a dojo snippet with the exact implementation that you are using.

    Regards,
    Dimitar Terziev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready