Hello.
When i create a new task is called CreateTask function of the controller, after this is called EditTask with id ans taskdto parameters. I need to send another value to the EditTask.
I try to used the “return ok” to send another value, but the EditTask function doesn’t recive this value.
Example:
Return of CreateTask: return Ok(new
{
tid = id,
sid = sid,
action = “inserted”
});
Edit Function:
public IHttpActionResult EditTask(decimal id, TaskDto taskDto, decimal sid)
Hello,
Unfortunately, I don’t specialize in ASP.NET technology, so I won’t be able to help you to modify the function on the server-side. But I can try to help you to apply some changes on the client-side.
Thank you for your answer.
I will try to modify the function on the server-side by my self, but please tell me what changes i need to do on the client-side.
Thank you very much.
Hello,
When you use the gantt.createTask() feature, Gantt creates a temporary task and opens the lightbox. The changes aren’t sent to the server-side. If you close the lightbox by clicking on the “Cancel” and “Delete” buttons, the temporary task will be removed.
After you click on the “Save” button, Gantt creates a new task by merging the data from the temporary task with the values from the lightbox. After adding a task, the changes are sent on the server-side.
Please, describe what actually you need to do on the client-side.
Hello,
After i click on the “save” button, the CreateTask (server-side) function is called with parameters (TaskDto taskDto). When this function is end:
return Ok(new
{
tid = newTask.ttaid,
action = "inserted",
});
After that, the EditTask (server-side) function is called with parameters (decimal id, TaskDto taskDto) and the taskDto is not updated with information add in CreateTask function.
I need to pass other parameter in editTask or update taskDto after called EditTask function.
I try to pass another parameter and prepare EditTask to received this parameter:
but doesnt work, the function EditTask is not called after CreateTask.
When i call gantt.updateTask(client-side) with a new parameter, everything is find.
Hello,
Gantt doesn’t have the EditTask function: https://docs.dhtmlx.com/gantt/api__refs__gantt_methods.html
A task can be modified via lightbox, inline editors, by dragging a task in the timeline or by API calls.
If you have a custom function, I need to see it.
If that function is part of the ASP.NET code - this is the server-side code, and I won’t be able to help you there.