I've been working on some error handling routines for in the event of a service failure, and have two questions as a result.
When the service fails, my error handler works as expected, and I'm able to get the error message from e.xhr.responseText. However, I have batch set to true in the Angular controller for the Gantt object, and the next time I make an update request, it's compounding the data with the failed request. I'd like to have control over whether to keep this data for the next request, or clear it on fail.
The other part of the issue is that when I hover over a Task, the information in the tooltip reflects the changed information that went out in the failed update, however, the view (position and size of the Task object) reflects the old data, so now I have an inconsistency between my model and my view. I tried to just call the refresh() method, but ran into the following problem:
var
gantt = $(
"div[data-role='gantttimeline']"
),
// returns HTML element as expected
ganttData = $(
"div [kendo-gantt]"
).data(
"kendoGantt"
);
// returns null, can't call refresh()
So, to recap, two issues. First of all, how can I clear the failed request from the queue and roll back the data in my model? Secondly, how can I get a handle on the Gantt data? All the examples that I could find use the above method, but they're also using Javascript to instantiate the object, where as I'm using Angular with a controller.
Thanks in advance for your help!