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

Always show vertical scrollbar and scroll events for timeline

3 Answers 257 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Graham
Top achievements
Rank 1
Graham asked on 16 Mar 2017, 12:49 PM

I have two Kendo scheduler timelines that are displayed one above the other. I want to keep the horizontal scroll position of the two timelines in sync by hooking into the scroll position for one timeline when scrolling in the other, but I can't see a way of doing this. Does anyone know of a way?

Also, in order to have a vertical correlation between the two timelines, I'd like to force the timelines to have a vertical scrollbar, even when one isn't needed: when a scrollbar is present in one of the timelines but not the other, the times don't align vertically because the scrollbar's width forces the compression of the time intervals. Again, any help would be appreciated.

3 Answers, 1 is accepted

Sort by
0
Graham
Top achievements
Rank 1
answered on 17 Mar 2017, 04:44 PM
I've figured out how to scroll the two timelines with code like this, in the dataBound function of each scheduler timeline (with the names reversed in the second timeline):
$("#timeline1>table>tbody>tr>td>div.k-scheduler-content").on("scroll", function () {
  $("#timeline2>table>tbody>tr>td>div.k-scheduler-content").scrollLeft($(this).scrollLeft());
});

 

However, I'm still not sure how to force the scheduler timeline to show a vertical scrollbar. I'd really appreciate some help on this.

 

 

0
Accepted
Bozhidar
Telerik team
answered on 20 Mar 2017, 02:06 PM
Hi,

You can force the scrollbar by applying the following CSS to the page:
#scheduler .k-scheduler-content {
    overflow-y: scroll;
}

Here's also a dojo sample demonstrating the style applied to the Scheduler:
http://dojo.telerik.com/AZaPU

Regards,
Bozhidar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Graham
Top achievements
Rank 1
answered on 20 Mar 2017, 02:16 PM
Aha! That seems to have done the trick. I thought I'd tried something similar to that but obviously not. Thanks for your help.
Tags
Scheduler
Asked by
Graham
Top achievements
Rank 1
Answers by
Graham
Top achievements
Rank 1
Bozhidar
Telerik team
Share this question
or