search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Sync 2 DPs

Asked by Anonymous
6 years ago.

I have two DPs. When I use the scrollbar of one DP the other should also be scrolled to the same position.

The added fiddle show the behaviour I want. How can I do this?


Answer posted by Dan Letecky [DayPilot]
6 years ago.

Please see the following demo:

    // scrollbar synchronization
    $(document).ready(function() {
        $(dp.nav.scroll).scroll(function() {
            dp2.nav.scroll.scrollLeft = dp.nav.scroll.scrollLeft;

        $(dp2.nav.scroll).scroll(function() {
            dp.nav.scroll.scrollLeft = dp2.nav.scroll.scrollLeft;

The "dp" and "dp2" variables hold the DayPilot.Scheduler objects. In ASP.NET you can set the name of this variable using ClientObjectName property.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.