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

How to implement row-up and row-down in gantt view.

Asked by Bikram Jeet Singh
20 days ago.


Is there any way we can implement a feature/function by which we can move a row up or down when button is clicked or context menu action is clicked.

thank you.

Comment posted by Dan Letecky [DayPilot]
18 days ago.

In the latest sandbox build (2023.1.5542), there are new methods added that will let you scroll as needed:


You can scroll down one row using setScrollY():

dp.setScrollY(dp.getScrollY() + dp.taskHeight);
Comment posted by BIKRAM JEET SINGH
17 days ago.

No, actually I meant moving. Suppose you click a button move up, it will move the task one row up just like the taskMoving( that we do by dragging the task).

Answer posted by Dan Letecky [DayPilot]
17 days ago.

Sorry for the confusion.

You can do this by changing the order of tasks in the data source (it's stored in dp.tasks.list). Then call update() to apply the changes.

Comment posted by BIKRAM JEET SINGH
17 days ago.

Oh, yes. Thank you

New Reply
This reply is
or drop files here
Your name (optional):