New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the Kendo Gantt for ASP.NET MVC events.

Definition

Constructors

C#
public GanttEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

Methods

Defines the handler of the Add client-side event. Fired when a new task or a new dependency is about to be added.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder Add(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Add event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.Add("handler"))
)

Defines the handler of the Cancel client-side event. Fired when the user cancels tasks's cell editing by pressing the 'Esc' key.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder Cancel(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Cancel event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.Cancel("handler"))
)

Defines the handler of the Change client-side event. Fired when the user selects a task in the Gantt.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder Change(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Change event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.Change("handler"))
)

Defines the handler of the ColumnHide client-side event. Fires when the user hides a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder ColumnHide(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnHide event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.ColumnHide("handler"))
)

Defines the handler of the ColumnReorder client-side event. Fires when the user changes the order of a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder ColumnReorder(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnReorder event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.ColumnReorder("handler"))
)

Defines the handler of the ColumnResize client-side event. Fired when the user resizes a column.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder ColumnResize(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnResize event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.ColumnResize("handler"))
)

Defines the handler of the ColumnShow client-side event. Fires when the user shows a column. The event handler function context (available through the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder ColumnShow(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ColumnShow event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.ColumnShow("handler"))
)

Defines the handler of the DataBinding client-side event. Fired before the widget binds to its data source.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder DataBinding(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DataBinding event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.DataBinding("handler"))
)

Defines the handler of the DataBound client-side event. Fired when the widget is bound to data from its data source.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder DataBound(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the DataBound event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.DataBound("handler"))
)

Defines the handler of the Edit client-side event. Fired when the user starts task edit upon double click on a cell.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder Edit(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Edit event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.Edit("handler"))
)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the Gantt is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the KendoKeydown event.

Returns:

GanttEventBuilder

Defines the handler of the Move client-side event. Fired when the user is moving a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder Move(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Move event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.Move("handler"))
)

Defines the handler of the MoveEnd client-side event. Fired when the user stops moving a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder MoveEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the MoveEnd event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.MoveEnd("handler"))
)

Defines the handler of the MoveStart client-side event. Fired when the user starts to drag a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder MoveStart(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the MoveStart event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.MoveStart("handler"))
)

Defines the handler of the Navigate client-side event. Fired when the user changes the selected view of the Gantt.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder Navigate(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Navigate event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.Navigate("handler"))
)

Defines the handler of the PdfExport client-side event. Fired when the user clicks the "Export to PDF" toolbar button.

C#
public GanttEventBuilder PdfExport(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the PdfExport event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.PdfExport("handler"))
)

Defines the handler of the Remove client-side event. Fired when a task or a dependency is about to be removed.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder Remove(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Remove event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.Remove("handler"))
)

Defines the handler of the Resize client-side event. Fired when the user is resizing a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder Resize(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Resize event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.Resize("handler"))
)

Defines the handler of the ResizeEnd client-side event. Fired when the user releases the mouse after resizing a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder ResizeEnd(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ResizeEnd event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.ResizeEnd("handler"))
)

Defines the handler of the ResizeStart client-side event. Fired when the user starts to resize a task.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder ResizeStart(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ResizeStart event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.ResizeStart("handler"))
)

Defines the handler of the Save client-side event. Fired when a task field is updated upon user interaction.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder Save(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Save event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.Save("handler"))
)

Defines the handler of the TogglePlannedTasks client-side event. The event will be raised upon Toolbar PlannedTasks Switch click. As a result, the planned tasks will be either hidden or shown in the Gantt Timeline view. The event is preventable.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public GanttEventBuilder TogglePlannedTasks(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the TogglePlannedTasks event.

Returns:

GanttEventBuilder

Example:
C#
@(Html.Kendo().Gantt&lt;TaskViewModel, DependencyViewModel&gt;()
.Name("gantt")
.Events(events =&gt; events.TogglePlannedTasks("handler"))
)