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

Changing eventHeight to auto changes height of the scheduler

3 Answers 697 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Grant asked on 04 Feb 2020, 06:58 AM

Hi,

As my title says, if I change the event height to "auto" for a month view, the height of the entire scheduler changes. it shrinks and then expands depending on the events.Is it not possible for the scheduler to remain 1000px high (for eg) and just the events auto size?

Please see my dojo (https://dojo.telerik.com/ONUcadIP) based on your docs example (https://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler/configuration/views.eventheight)

Thanks,

Grant

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 05 Feb 2020, 04:55 PM

Hello Grant,

Actually, in the example you posted the Scheduler keeps its height (1000px), see this screenshot. It is the time slots that resize based on the number of events in them. Since there is only one event in one of the slots the total height of the slots is smaller than the total height of the Scheduler. If you were to add more events the total height of the slots will increase, but up to the Scheduler's height, i.e. the specified height is respected.

This behavior is due to the eventHeight option's "auto" value. Set like this it enables another option: adaptiveSlotHeight. This is mentioned as a note in the eventHeight api documentation.

Regards,
Ivan Danchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
answered on 06 Feb 2020, 05:50 AM

Hi Ivan, 

I understand all that, thanks. I should have been clearer in my question.

Is it possible at all to set the the adaptiveSlotHeight=false and eventHeight=auto? That way the scheduler can fill the 1000px height, and just the events within the slots have a varying height. Or does the eventHeight being false override the adaptiveSlotHeight to true, regardless of its current value?

Thanks, 
Grant

0
Ivan Danchev
Telerik team
answered on 07 Feb 2020, 03:45 PM

Hi Grant,

eventHeight="auto" is implemented to work only with adaptiveSlotHeight=true, i.e. you cannot have auto-resizing events with adaptiveSlotHeight disabled. Consider the following example: https://www.screencast.com/t/lFpHDoBft

With eventHeight set to "auto" the event with long title "asdas..." has resized proportionally to fit the text of the title. As a result the slot has also resized to fit this event (and "Interview", which has the same date). If adaptiveSlotHeight were to remain disabled the slots would maintain their height. If that were the case how would the resized event fit within such a slot? Going back to the screenshot above imagine fitting the "asdas..." event within the height of the next slot where "test2" is. And what if you have 5 events like "asdas" on the same date? If the slot does not resize to fit them all there would be no point setting eventHeight to "auto".

I hope this explains the need for adaptiveSlotHeigh being enabled when eventHeight is set to "auto". If you want adaptiveSlotHeight disabled, then the options are:

1. not setting eventHeight explicitly. In this case it will use its default value (25).

2. setting a number to eventHeight, for example: eventHeight: 100

Regards,
Ivan Danchev
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Scheduler
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Ivan Danchev
Telerik team
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Share this question
or