I'm trying to create a scheduler with Kendo. But I meet some bugs.
And the biggest is the following.
When I want to edit a task, I can change all values if I validate my modification, it changes the datasource correctly. Then, if I open it again, all data appears properly. BUT if I click on the cancel event ( the cross button or the cancel button ), the datasource of the current item come back to initial value and ignore the modifications I made before.
I tried a lot of solutions, even while removing all of my code, but the problem was still here. I tried to use the preventDefault function while closing, and hiding myself the widget, but the problem remains.
If anyone can help me, would be great :)
Sorry for my bad English, Thanks for reading !
I resolve my problem with the following solution.
I was needing an Update function, because it wasn't updating pristine datas when I was saving something (it was saving only in my scheduler.dataSource.data()). I tried to use dataSource.sync() instead of it, but it didn't work.
If someone have a similar problem, be carreful about pristine datas and all would be fine ;)
There is the update function (the easier you can make) :
public ActionResult UpdateTachesScheduler([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<PlanningModel> model)
{
return Json(model.ToDataSourceResult(request, ModelState));
}