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,
You can also find a sample to set predefined value for add dialog field here.