Hi Tomasz,
We can use custom dialog instead of Gantt default add/edit dialog for add/edit actions.
This can be achieved by canceling the dialog open action by using “actionBegin” client side event with requestType as “beforeOpenAddDialog”, and also we can initialize custom dialog in this event.
Please find the code snippet for this.
$("#GanttContainer").ejGantt({
actionBegin: function (args) {
if (args.requestType == "beforeOpenAddDialog") {
args.cancel = true;
}
},
toolbarClick: function(args){
var itemName = args.currentTarget && args.currentTarget.id;
if (itemName == this._id + "_add") {
$("#customDialog").ejDialog("open");
}
},
}); |
We can add input elements in custom dialog and on save action we can get the data from custom dialog and pass this data to Gantt public methods for required action.
We have prepared a sample for this and prevent the default add dialog and rendered empty dialog, you can add your own input elements in this dialog.
Please find the sample from below link.
Currently we can’t use custom edit dialog to update records because currently there is no public method available to update record dynamically. Hence, we have logged a feature report “Update Gantt record values dynamically by using script”. Also we have created a support incident under your account to track the status of this feature.
Please log on to our support website to check for further updates.
Please let us know if you require further assistance on this.
Regards,
Jayakumar D