Articles in this section
Category / Section

How to set predefined values for dialog fields in Gantt

1 min read

In Gantt it is possible to set predefined values for add and edit dialog fields. User can set these predefined values for the data source fields before the dialog opens by using actionBegin client-side event with the event argument as beforeOpenAddDialog or beforeOpenEditDialog. The following code example explains how to set predefined values for duration field in add dialog.

<script>
    $("#GanttContainer").ejGantt({
        //…
        actionBegin: function (args) {
            if (args.requestType == "beforeOpenAddDialog") {
                args.data.Duration = 1;
            }
        },
    })
</script>

The below screenshot explains the above behavior,

Predefined values for add and edit dialog fields.

You can also find a sample to set predefined value for add dialog field here.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied