Back to Devexpress

GanttSettings.ClientSideEvents Property

aspnetmvc-devexpress-dot-web-dot-mvc-dot-ganttsettings-15b36e1f.md

latest2.1 KB
Original Source

GanttSettings.ClientSideEvents Property

Gets an object that lists the client-side events specific to the GanttSettings.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public GanttClientSideEvents ClientSideEvents { get; }
vb
Public ReadOnly Property ClientSideEvents As GanttClientSideEvents

Property Value

TypeDescription
GanttClientSideEvents

An object that allows you to handle the component’s client-side events.

|

Remarks

The ClientSideEvents property provides access to an object of the GanttClientSideEvents type. This object contains properties whose names correspond to the events available to the GanttSettings on the client side. These properties provide the capability to assign handling JavaScript functions to the required client-side events of the GanttSettings.

Run Demo: MVCxGantt - Client-Side Events

cshtml
@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.ClientSideEvents.StartCellEditing = "onGanttStartEdit";

    ...
}).Bind(
    GanttDataProvider.Tasks, 
    GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, 
    GanttDataProvider.ResourceAssignments)
  .GetHtml()
js
function onGanttStartEdit(s,e) {
    // your code
    e.cancel = true.
}

See Also

GanttSettings Class

GanttSettings Members

DevExpress.Web.Mvc Namespace