New to Telerik UI for WPF? Start a free 30-day trial

Overview

Updated on Sep 23, 2026

This topic covers the specific events exposed by RadGanttView.

RadGanttView raises the following events, when a task is edited through the UI, in the order that they are shown below:

  • TaskEditing: Occurs when the task editing is initiated through the UI. Example 1 demonstrates how you can handle the event in order to cancel the editing based on a specific condition.

    Example 1: Canceling the editing of a task

    C#
    private void GanttView_TaskEditing(object sender, Telerik.Windows.Controls.GanttView.TaskEditingEventArgs e)
    {
        //  if (your condition here)
        //{
        //	e.Cancel = true;
        //}
    }
    VB.NET
    Private Sub GanttView_TaskEditing(ByVal sender As Object, ByVal e As Telerik.Windows.Controls.GanttView.TaskEditingEventArgs)
    	If your condition here Then
    		e.Cancel = True
    	End If
    End Sub
  • TaskSaving: Occurs when an edit operation is being committed through the UI. Please, note that you can handle this event to cancel the editing similarly to Example 1.

    The TaskEditing and TaskSaving events receive the following two arguments:

    • The sender argument contains the RadGanttView. This argument is of type object, but can be cast to RadGanttView type.

    • A TaskEditingEventArgs object. It contains the task that is being edited.

  • TaskEdited: Occurs when a task has been edited through the UI. Example 2 demonstrates how you can handle the event in order to show a MessageBox indicating the Duration of the task after it has been edited.

    • The sender argument contains the RadGanttView. This argument is of type object, but can be cast to RadGanttView type.

    • A TaskEditedEventArgs object. It contains the task that has been edited.

    Example 2: Show Task duration after it has been edited

    C#
    private void GanttView_TaskEdited(object sender, Telerik.Windows.Controls.GanttView.TaskEditedEventArgs e)
    {
        var durationAfterEditing = e.Task.Duration;
        MessageBox.Show($"The duration after editing is - {durationAfterEditing}");
    }
    VB.NET
    Private Sub GanttView_TaskEdited(ByVal sender As Object, ByVal e As Telerik.Windows.Controls.GanttView.TaskEditedEventArgs)
    	Dim durationAfterEditing = e.Task.Duration
    	MessageBox.Show($"The duration after editing is - {durationAfterEditing}")
    End Sub

See Also

In this article
See Also
Not finding the help you need?
Contact Support