Gantt - force parent dates recalculation and refresh

5 posts, 0 answers
  1. Aljoša
    Aljoša avatar
    4 posts
    Member since:
    May 2011

    Posted 29 Aug Link to this post

    hi,
    is there a way to force parent dates to refresh and draw parent (summary task) accordinglly, like it is done when (child) task is moved?

    Example:
    My data source (last one is parent with start = end)
    <KendoGanttItem><id>10741</id><start>19.09.16 05:00</start><end>19.09.16 08:00</end><parentId>13086</parentId>...</KendoGanttItem>
    <KendoGanttItem><id>11086</id><start>19.09.16 13:00</start><end>19.09.16 14:00</end><parentId>13086</parentId>...</KendoGanttItem>
    <KendoGanttItem><id>13086</id><start>19.09.16 00:00</start><end>19.09.16 00:00</end><summary>Yes</summary><expanded>Yes</expanded>...</KendoGanttItem>
    When I move 1 of the child tasks, parent gets start and end date and is drawn accordingly.
    That is what I would like to achive programmatically.
    I tried
    Gantt.Refresh(),
    Tried setting some property so it could refresh
        $("#gantt").data("kendoGantt").dataSource.view()[2].set("expanded", false);
        $("#gantt").data("kendoGantt").dataSource.view()[2].set("expanded", true);

    Thanx
  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    561 posts

    Posted 31 Aug Link to this post

    Hi Aljoša,

    As far as I can understand, initially you have a parent task, which start and end dates do not match the start and end of its children. If this is the case, I am afraid, that the Gantt API would not offer you the possibility to update the summary task dates. The Gantt chart DataSource members are expected to match properly their start / end dates.

    In case you think that such functionality would add value to the widget, I would suggest you to log your idea in our Feedback portal.

    Regards,
    Veselin Tsvetanov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Aljoša
    Aljoša avatar
    4 posts
    Member since:
    May 2011

    Posted 31 Aug Link to this post

    Hi Veselin,

    you did understand me correctly. So it cannot be done programmatically...

    Is there any way to fire move event on task, because when task is moved, "parent task" does get new start and end dates...

    Check my attachment (sorry for not including it before...)

    In 3rd step you can see that parent appears on screen, and it gets correct dates and it happens after task move event...

    Thanks for your suggestions and reply.

    BR

  4. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    561 posts

    Posted 04 Sep Link to this post

    Hi Aljoša,

    The move event of the Gantt could be manually triggered using the trigger() method of the widget (gantt.trigger('move');). This, however, won't force the parent (summary) task to update its start and end. It will update those values only, when a user interaction is detected. Therefore, I am afraid, that the widget does not offer a way to programmatically trigger update of the discussed values.

    Regards,
    Veselin Tsvetanov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Aljoša
    Aljoša avatar
    4 posts
    Member since:
    May 2011

    Posted 06 Sep in reply to Veselin Tsvetanov Link to this post

    Hi Veselin,

    thank you again.

    BR

Back to Top