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
1 year 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]
1 year 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
1 year 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]
1 year 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
1 year ago.

Oh, yes. Thank you

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