JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Gantt Gantt chart Task Segment Update / Scroll to task segment

  • This topic has 4 replies, 2 voices, and was last updated 1 year ago by sj444.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #104678
    sj444
    Participant

    Hello,

    Is there a method I can use to scroll to a particular task segment by passing in its index or object itself?

    I want to apply the same when I update the data source. I tried using update task method but I’m not getting the preffered result as the segments are getting distorted.

    Or else if there is a method to update a particular task segment without refreshing the whole data source, I can use that too.

     

    #104679
    Steven Peterson
    Participant

    Hi,

    You can use the ensureVisible method to scroll to a given task.
    The method accepts an id of a task.

    Here is an example: https://codepen.io/Steevee222/pen/Jjmdxrd?editors=1010

    I hope this helps!

    Best Regards,
    Steven Peterson

    Smart UI Team
    https://www.htmlelements.com/

    #104680
    sj444
    Participant

    Hi,

    Thank you so much for your quick response.

    I tried the above method. But my requirement is to scroll to a specific segment in a task containing multiple segments and not just to the starting segment of the task. Is there a method where I can probably feed in the segment object/id to scroll to it?

    • This reply was modified 1 year ago by sj444.
    #104684
    Steven Peterson
    Participant

    Hi,

    Here is a custom scroll functionality:
    https://codepen.io/Steevee222/pen/OJBVeKK

    In the demo, a built-in function of the Gantt is used to determine the cell position.

    I hope this helps with the scrolling to a given task segment.

    Best Regards,
    Steven Peterson

    Smart UI Team
    https://www.htmlelements.com/

    #104696
    sj444
    Participant

    Hi,

    I believe it would work for me. Thank you so much..

     

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.