Skip to main content
All docs
V25.1
  • ASPxClientGantt.TaskEditDialogShowing Event

    Occurs before the edit dialog is shown.

    #Declaration

    TypeScript
    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