This is a migrated thread and some comments may be shown as answers.

Dynamic Scheduler Width

3 Answers 374 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Abradax
Top achievements
Rank 1
Abradax asked on 30 Nov 2015, 01:45 PM

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.

 

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 02 Dec 2015, 09:54 AM
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
0
Abradax
Top achievements
Rank 1
answered on 02 Dec 2015, 10:48 AM

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?

0
Georgi Krustev
Telerik team
answered on 04 Dec 2015, 09:35 AM
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
Tags
Scheduler
Asked by
Abradax
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Abradax
Top achievements
Rank 1
Share this question
or