Can't get handle to Gantt data/error handling

3 posts, 0 answers
  1. Kris
    Kris avatar
    3 posts
    Member since:
    Aug 2015

    Posted 26 Aug 2015 Link to this post

    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!

     

     

  2. Kris
    Kris avatar
    3 posts
    Member since:
    Aug 2015

    Posted 26 Aug 2015 Link to this post

    Oops, can't edit my last post, but I spotted a mistake in the code snippet. It should be:

    var gantt = $("div [kendo-gantt]"), // returns HTML element as expected
      ganttData = $("div [kendo-gantt]").data("kendoGantt"); // returns null, can't call refresh()
     

    Sorry about that.

  3. Kendo UI is VS 2017 Ready
  4. Bozhidar
    Admin
    Bozhidar avatar
    1101 posts

    Posted 31 Aug 2015 Link to this post

    Hello,

    Could you open a support ticket and send a sample project that we can inspect, so that we can observe the same issues you are encountering? 

    Regards,
    Bozhidar
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top