April 22, 2025, 03:35:33 AM

See more Support incidents in our old archived forum.

Author Topic: Multi task drag-and-drop / move  (Read 4213 times)

ricky.blankenaufulland

  • Customers
  • Newbie
  • *
  • Posts: 18
Multi task drag-and-drop / move
« on: November 27, 2015, 01:49:27 PM »
I would like to be able to select more than one task (for example using ctrl key) which should be easy. But then I would like to stretch/move them all together. Would this be possible?

ForumAdmin

  • Administrator
  • Jr. Member
  • *****
  • Posts: 96
Re: Multi task drag-and-drop / move
« Reply #1 on: November 29, 2015, 03:43:30 PM »
Hi Ricky,

You can implement this using the following approach:

a) First track the selected tasks - you mentioned you have already figured this.

b) Listen to this event which gets called when a task is Shifted:
Code: [Select]
            ShiftAndConnectionTracker.Global.PropertyChanged += Shifter_PropertyChanged;

        void Shifter_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if(e.PropertyName == "ProposedStartTime")
            {
                ShiftAndConnectionTracker shifter = ((ShiftAndConnectionTracker)sender);
                DateTime newStart = shifter.ProposedStartTime;
                IActivity activity = ((GanttTaskItemBar)shifter.CurrentRenderer).ActivityView.Activity;
                CustomTask task = ((DataBoundActivity)activity).DataSource as CustomTask;

                // Shift the selected tasks here.
            }
        }

If the above works we can elaborate on how to do this for resizing too.

Thanks
RQ Support

ricky.blankenaufulland

  • Customers
  • Newbie
  • *
  • Posts: 18
Re: Multi task drag-and-drop / move
« Reply #2 on: December 01, 2015, 02:07:34 PM »
Thanks, I will check this out and come back.