Dynamic Scheduler Width

4 posts, 0 answers
  1. Abradax
    Abradax avatar
    14 posts
    Member since:
    Feb 2014

    Posted 30 Nov 2015 Link to this post

    Hi again, another question for scheduler.

     In setting up scheduler, I am running into a problem with the width of my events.  I have a large number of events that I would like to display.

    It looks like the Scheduler gets its size based on the number of events, and a slot size determined by the client browser.

     

    What I would like to achieve is in week view, I would like to set the event width to a fixed size of 125px, then have scheduler calculate column widths off of this value.

     

    What is happening is that on week view, if a day has 30 people scheduled, the events are so thin they can't be seen.  I'd like to set them to a fixed width and have scheduler stretch to accommodate it.

     I can achieve something similar with CSS by using:

    .k-event {
           font-size: 12px !important;
       }
      
           .k-scheduler-layout {
           table-layout: fixed;
           overflow: -moz-scrollbars-horizontal;
       }
      
       .k-scheduler-layout > tbody > tr > td:first-child
           {
             width: 85px;
           }
      
       .k-scheduler-weekview .k-scheduler-content .k-scheduler-table,
       .k-scheduler-weekview .k-scheduler-header .k-scheduler-table {
           min-width: 25200px !important;
       }

     

    But that isn't a real fix, as if my schedule grows to accommodate more individuals I will run into bleeding of events into another day (display issue), and on days with light scheduling, I have a lot of white space that looks bad.

     

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 02 Dec 2015 Link to this post

    Hello Abradax,

    In general, the widget positions the events based on the view's width. I am afraid that stretching the value dynamically based on a static event width is not possible. What I would suggest you is to enable horizontal scrolling of the week view and stretch the view itself:
    The other option is to write a custom view, where the view is stretched based on the event width. Note that this task falls out of the scope of the standard support service as it requires custom implementation.

    Regards,
    Georgi Krustev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Abradax
    Abradax avatar
    14 posts
    Member since:
    Feb 2014

    Posted 02 Dec 2015 in reply to Georgi Krustev Link to this post

    I was hoping that wasn't what you were going to say :)

     I am using the first option suggested with the drawbacks it entails.  

    Perhaps another method?  I am more than willing to use timeline view, but when the view opens I'd like to have the scheduler scroll to the current time frame.  

     This code works in Day and Week view:  http://www.telerik.com/support/code-library/scroll-to-time-slot

     But It looks like for Timeline view there is only one table row, so it only loops once and only sees the 00:00 timeslot.  Is there code for a scroll to timeslot for the timeline views?

  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 04 Dec 2015 Link to this post

    Hello,

    The described limitation is a known issue that is already logged. We will address it in the future releases of Kendo UI / UI for ASP.NET MVC.

    For now you can scroll the content manually to accomplish your goal. Check this demo for more details:
    Regards,
    Georgi Krustev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready