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

How to set the resource (scrollY) position.

Asked by Dave Baker
8 years ago.

Is is possible to search and set the scroll position for the resources?
Thank You.

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

On the server side, ScrollY and ScrollX properties are available. They hold the scroll position in pixels and you can update them (don't forget to call Update()).

On the client side, you can read the position using getScrollX() and getScrollY() and change it using setScroll(x, y). All values in pixels.

See also:

Comment posted by Dave Baker
8 years ago.

Hi Dan,
Thank you for your response. I don't think I explained what I was trying to do very well.
I am using the Daypilot Scheduler and loading the resources from a database. The resources are people and I would like to use a text box to enter part of the persons name and set the scroll position to that person. Is there any way to do that with the Scheduler?
Thank You,

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

I see. You can try this:

function findRowTopByName(name) {
  for (var i = 0; i < dps.rows.length; i++) {
    var row = dps.rows[i];
    if (row.Name.indexOf(name) != -1) {
      return row.Top;
  return -1; // not found

dps.setScroll(dps.getScrollX(), findRowTopByName('Jack'));

Warning: It's based on undocumented properties (dps.rows is not to be accessed directly) and it may stop working in the future.

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