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

OnClientTaskSelectionChanged

The OnClientTaskSelectionChanged occurs when the user selects a task in the Gantt. The equivalent of Kendo UI Gantt change event.

The event handler receives two parameters:

  1. The instance of the Gantt control firing the event.

  2. An eventArgs parameter containing the following methods:

  • get_sender returns the underlying Kendo UI Gantt widget that fired the event.
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientTaskSelectionChanged="OnClientTaskSelectionChanged">
</telerik:RadGantt>
function OnClientTaskSelectionChanged(sender, eventArgs) {
    var kendoGantt = eventArgs.get_sender();
    var selection = kendoGantt.select();
    var task;

    if (selection){
        task = kendoGantt.dataItem(selection);
        console.log(kendo.format("{0} is selected", task.title));
    }
}

See Also

In this article