All docs
V21.2
21.2
21.1
20.2
20.1
The page you are viewing does not exist in version 20.1.
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.

ASPxClientGantt.TaskEditDialogShowing Event

Occurs before the edit dialog is shown.

Declaration

TaskEditDialogShowing: ASPxClientEvent<ASPxClientGanttTaskEditDialogShowingEventHandler<ASPxClientGantt>>

Event Data

The TaskEditDialogShowing event's data class is ASPxClientGanttTaskEditDialogShowingEventArgs. The following properties provide information specific to this event:

Property Description
cancel Specifies whether to cancel the related action (for example, row edit, export). Inherited from ASPxClientCancelEventArgs.
hiddenFields Specifies hidden fields in the edit dialog.
key Specifies the task key.
readOnlyFields Specifies read-only fields in the edit dialog.
values Specifies the task values.

Remarks

Gantt - Popup Edit Form

Run Demo: ASPxGantt - Client-Side Events Run Demo: MVCxGantt - Client-Side Events

Use the TaskEditDialogShowing event to customize the edit dialog before it is invoked.

Web Forms:

<dx:ASPxGantt ID="Gantt" >
    <ClientSideEvents TaskEditDialogShowing="function(s, e) {
        e.values["Subject"]= "Custom dialog text";
        e.readOnlyFields.push("Subject");
        e.hiddenFields.push("PercentComplete");
    }" />
</dx:ASPxGantt>

MVC:

@Html.DevExpress().Gantt(settings => {
    settings.Name = "gantt";
    settings.ClientSideEvents.TaskEditDialogShowing = "function (s, e) { 
        e.values["Subject"]= "Custom dialog text";
        e.readOnlyFields.push("Subject");
        e.hiddenFields.push("PercentComplete");
    }";
    ...
}).Bind(
    GanttDataProvider.Tasks, GanttDataProvider.Dependencies, 
    GanttDataProvider.Resources, GanttDataProvider.ResourceAssignments
).GetHtml()

Result:

Gantt - TaskEditDialogShowing Event

Note that the readOnlyFields and hiddenFields event parameters affect only task fields. Use the AllowTaskResourceUpdate property to hide the Resource Manager in the Task Details dialog.

Concepts

See Also