GanttView makes it easier for you to rearrange your tasks to occupy new positions in the project's schedule. You can move a task at run time using the up or down arrows located on the C1GanttView Toolbar.
To move a task at run time, follow the steps below:
To move a task using code, you can use RemoveAt and Insert methods of the Collection class.
Below code snippet shows how you can move a task programmatically in the GanttView.
C# |
Copy Code
|
---|---|
int taskindex = tasks.IndexOf("Task 1"); C1.Win.C1GanttView.Task task1 = tasks[taskindex]; tasks.RemoveAt(0); tasks.Insert(1, task1); |