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

Scroll position getting lost when doing a next or previous day/week?

Asked by Tom
16 years ago.
Hi Dan,

I have implemented on our control a day/week/month view which works perfect.

I have also implemented a previous and next function for each of the views. The problem I have is that when I do a refreshCallBack the ScrollPosition is lost and so starts from 00:00:00.

I have looked at the demo and the same thing happens there.
Comment posted by Dan Letecky
16 years ago.
In DayPilotCalendar, the scroll position doesn't change after refresh. It shows the same time of day.

In DayPilotScheduler, the scroll position is reset intentionally because keeping the current position doesn't make too much sense (e.g. for a month view, if you show February with scroll position on 6 Feb and jump to the next month there is no reason to skip the first five days).

The problem with the scheduler is rather that it can't set the scroll position in the Refresh event handler (any changes are ignored). I'm planning to add support for this scenario (i.e. changing scroll position during callback operations). See also http://forums.daypilot.org/Topic.aspx/250/hiding_times_that_are_non_business_days (my post from 1/23/2008 3:57:51 PM).
Comment posted by Max
15 years ago.

Hi,

I would like to know if there is any change concerning this issue.

Also, are you planning to add a flag that could let us keep the scroll position during a callback ?

Thanks,

Maxime

Comment posted by Maxime
15 years ago.

Hi,

is there any news about that ?

Thanks,

Maxime

Comment posted by MiracleMike
15 years ago.
That would be useful for DayPilotScheduler to at least scroll to the first business hour after a "next day previous day" callback. As well as hiding non-business hour
Comment posted by Dan Letecky
15 years ago.

In DayPilot Pro 5.1, the scroll positions (both horizontal and vertical) are fully configurable during PostBack and full CallBack (CallBackUpdateType.Full) using the following properties:

  • ScrollX
  • ScrollY

Both these properties accept integer values (in pixels). You can also translate the DateTime to ScrollX using a new SetScrollX(DateTime) property.

The old ScrollPosition property (DateTime) is not available anymore.

Applies to DayPilotScheduler.

Comment posted by Maxime
15 years ago.

Thanks Dan for that improvement.

Maxime

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