New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

DependencyInsert

The RadGantt DependencyInsert is fired when a dependency's collection is about to be inserted in the database.

DependencyInsert event handler receives two parameters:

  • sender is the RadGantt control instance.

  • e is an object of type DependencyEventArgs. It gives you access to the inserted Dependencies collection.

Example

<telerik:RadGantt RenderMode="Lightweight" ID="RadGantt1" runat="server" OnDependencyInsert="RadGantt1_DependencyInsert"></telerik:RadGantt>
protected void RadGantt1_DependencyInsert(object sender, Telerik.Web.UI.Gantt.DependencyEventArgs e)
{
    foreach (var dependency in e.Dependencies)
    {
        if (dependency.Type == Telerik.Web.UI.Gantt.DependencyType.FinishFinish)
        {
            e.Cancel = true;
        }
    }
}
Protected Sub RadGantt1_DependencyInsert(sender As Object, e As Telerik.Web.UI.Gantt.DependencyEventArgs)
    For Each dependency As var In e.Dependencies
        If dependency.Type = Telerik.Web.UI.Gantt.DependencyType.FinishFinish Then
            e.Cancel = True
        End If
    Next
End Sub

See Also

In this article