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

Synchronize Scrolling on two Scheduler controls

Asked by Steve
14 years ago.

Hi there!

I would like to synchronize the horizontal scrollbars across two separate scheduler controls.
I understand that this must be handled in javascript somehow to get it to work on the client side.. however I don't quite know how to implement this.

Will it be possible to override the SetScrollX() method and substitute the DateTime parameter with an integer for example?

Any suggestions would be awesome!

Cheers.

Comment posted by --pogo (pat)
13 years ago.

I've recently started using the Scheduler component for a client project - this looks like my opportunity to give something back.

I implemented (just now) synchronised scrolling with jQuery:

$(schPilatJobClient.divTimeScroll).scroll(function (e) {
	schPilatPilotClient.divTimeScroll.scrollLeft = e.currentTarget.scrollLeft;
	schPilatPilotClient.divTimeScroll.nextSibling.scrollLeft = e.currentTarget.scrollLeft;
});
$(schPilatPilotClient.divTimeScroll).scroll(function (e) {
	schPilatJobClient.divTimeScroll.scrollLeft = e.currentTarget.scrollLeft;
	schPilatJobClient.divTimeScroll.nextSibling.scrollLeft = e.currentTarget.scrollLeft;
});

where schPilatJobClient and schPilatPilotClient are the ClientObjectNames of the Scheduler controls. You'll need jQuery and jQuery UI to make it work.

Comment posted by Dan Letecky
13 years ago.

Thanks for posting the solution!

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