wpf-devexpress-dot-xpf-dot-gantt-dot-ganttview-6839843c.md
Occurs each time the task hierarchy and order is changed and allows you to keep two tasks linked even if they organize a cyclic task connection or a child task links to its summary task. This is a routed event.
Namespace : DevExpress.Xpf.Gantt
Assembly : DevExpress.Xpf.Gantt.v25.2.dll
NuGet Package : DevExpress.Wpf.Gantt
public event EventHandler<QueryKeepTasksLinkedEventArgs> QueryKeepTasksLinked
Public Event QueryKeepTasksLinked As EventHandler(Of QueryKeepTasksLinkedEventArgs)
The QueryKeepTasksLinked event's data class is DevExpress.Xpf.Gantt.QueryKeepTasksLinkedEventArgs.
In versions prior to v19.2, changing Gantt tasks’ order or hierarchy might lead to the following:
If these links were not deleted, the scheduling and critical path calculation features did not work.
Starting with v19.2, these links are deleted automatically. You can keep them by handling the QueryKeepTasksLinked event:
gantt.View.QueryKeepTasksLinked += (sender, e) => e.KeepLinked = true;
AddHandler g.View.QueryKeepTasksLinked, Function(sender, e) e.KeepLinked = True
Use the QueryAllowPredecessorLinkEdit event to create custom rules and limitations for task connectors.
See Also