How can i save tasks in dhtmlx gantt ?

I succeed in saving tasks in the data base, the problem is that when I add a new task there is no change in the chart, for example if I add a new task with 4 days as duration it appears just one cell not four ones and also for the other properties.
Here the code of adding a new task :

[code][/code]

Hi,
If you save and load a correct start_date and duration, it should be displayed in the chart.
Please show the values that are sent to the server and the sample of JSON data that displays the wrong duration

One thing regarding formatting the values. Gantt provides the templaters for a date objects, which should make code more readable.
Also, instead of hideLightbox you can simply return ‘true’ from the handler. Otherwise the client-side won’t apply values set in the lightbox

docs.dhtmlx.com/gantt/desktop__d … ttoastring

[code]gantt.attachEvent(“onLightboxSave”, function(id, task, is_new){
var dateToStr = gantt.date.date_to_str("%d-%m-%Y");

$.post("Control",{
	id:task.id,
	duration:task.duration,
	text:task.text,
	start_date:dateToStr(task.start_date)
},function(data){
	alert(data);
}) ;

return true;

});
[/code]