We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Gantt resource view

I am using your syncfusion gantt (resource view) as a trial version , we have some queries . As i am new to this control.
  1. while drag and drop the task node it has to ask confirmation message .If i click "cancel" button it has to be not allowed to drag to the next position .Please refer the below sample 
Here is the sample 

private void Gantt_NodeDragCompleted(object sender, NodeDragAndDropEventArgs args)
        {
            MessageBox.Show("Update", "GanttMessage", MessageBoxButton.OKCancel);
            if (DialogResult == true) //OK
            {

                // Update the nodes of the gantt chart and position of the nodes have to change
            }
            else //Cancel
                //dont update the nodes , and the position of the nodes cannot be changed (come back to the previous position )                   
        }


2. How to avoid overlapping of task nodes.For example
   I already assigned some dates like , March 25 to March 30 .This particular date will be reserved and if i drag another task to this date or in between these dated . It must not have to be allowed .



1 Reply

RA Riyaj Ahamed I Syncfusion Team April 2, 2013 09:14 AM UTC

Hi Amal,

 

Thanks for contacting Syncfusion support.

 

Please find the response for your queries below,

 

Query 1: while drag and drop the task node it has to ask confirmation message .If i click "cancel" button it has to be not allowed to drag to the next position

 

You can achieve this requirement by handling NodeDragCompleted Event. The following code snippet will illustrate this,

 

[C#]

 

        private void Gantt_NodeDragCompleted(object sender, NodeDragAndDropEventArgs args)

        {

            MessageBox.Show("Update", "GanttMessage", MessageBoxButton.OKCancel);

            if (DialogResult != true) //OK

            {

                //the position of the nodes cannot be changed and come back to the previous Position                   

                  args.Handled=true;

            }

        }

 

 

Query 2: How to avoid overlapping of task nodes.

 

You can achieve this requirement by handling NodeDragCompleted and NodeResizingCompleted events. We created the sample for this requirement and please check the sample from following link,

 

Sample: Preventoverlapping.zip

 

Please let us know if you need further assistance.

 

Regards,

Riyaj Ahamed I


Loader.
Live Chat Icon For mobile
Up arrow icon