OnClientRemoving
The OnClientRemoving occurs when a task or a dependency is about to be removed. The event can be canceled. The equivalent of the underlying Kendo UI Gantt remove event.
The event handler receives two parameters:
-
The instance of the Gantt control firing the event.
-
An eventArgs parameter containing the following methods:
-
get_task returns the GanttTask instance which is being removed from the DataSource.
-
set_cancel lets you cancel the event and prevent the inserting.
-
get_cancel returns true if the event has been canceled.
-
dependencies returns an array of GanttDependency instances which are associated with the task being removed, or an array with a single dependency which is being removed.
-
get_sender returns the underlying Kendo UI Gantt widget that fired the event.
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientRemoving="OnClientRemoving">
</telerik:RadGantt>
function OnClientRemoving(sender, eventArgs) {
// cancel the event
args.set_cancel(true);
}