Hi Adam,
Greetings from Syncfusion support.
We are prepared a Gantt sample and loaded tasks from SQL database and updated the database on CRUD action in source version 17.1.0.38.
Please find the code example below.
<ej:Gantt ID="Gantt1" runat="server"
//…
ActionComplete="ActionComplete">
</ej:Gantt>
<asp:ScriptManager ID="ScriptManager" runat="server" EnablePageMethods="True" />
<script type="text/javascript">
function ActionComplete(args) {
if (args.requestType == "save" && args.addedRecord) {
var data = args.addedRecord.item;
PageMethods.AddIt(data);
}
}
</script>
|
[WebMethod]
public static void AddIt(TaskData record)
{
GanttSample sample = new GanttSample();
sample.Add(record);
}
public void Add(TaskData Task)
{
GanttData data = new GanttData
{
TaskId = Task.TaskId,
//...
};
db.GanttDatas.Add(data);
db.SaveChanges();
}
|
Please, find the sample and KB link below.
Please get back to us if you require further assistance on this.
Regards,
Pooja Priya K.