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

Sync 2 DPs

Asked by Anonymous
8 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?

Regards,
Marko

https://jsfiddle.net/13Lrotc7/

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

Please see the following demo:

http://javascript.daypilot.org/demo/scheduler/eventmovingtwoschedulers.html

    // 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 1 months old and has been closed. Please create a new question if you have anything to add.