New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnClientNavigationCommand
The OnClientNavigationCommand occurs when the user changes the selected view of the Gantt.
The event handler receives two parameters:
-
The instance of the Gantt control firing the event.
-
An eventArgs parameter containing the following methods:
-
set_cancel lets you cancel the event and prevent the view switching.
-
get_view returns the name of the selected view.
-
ASP.NET
<telerik:RadGantt RenderMode="Lightweight" runat="server" id="RadGantt1" OnClientNavigationCommand="OnClientNavigationCommand">
</telerik:RadGantt>
JavaScript
function OnClientNavigationCommand(sender, eventArgs) {
args.set_cancel(true);
}