Home Unanswered Active Tags New Question

Synchronize Scrolling on two Scheduler controls

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.

Asked by Steve 1 year ago.
Replies

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 --pogo (pat) 7 months ago.

Thanks for posting the solution!

Comment posted by Dan Letecky 7 months ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java