My gantt chart has many tasks and subtasks. I am trying to make is so when users enter the home page the subtasks are collapsed by default so not too many tasks show up on screen at once as it will look too cluttered.

I am able to collapse subtasks by default for normal task list view but for gantt chart the html is way different and using jQuery to change it doesn't look possible/easy to do.

1 Answer 1


This post might point you in the right direction. https://social.technet.microsoft.com/Forums/ie/en-US/d4c37e55-693f-4751-9747-4e875c91edb0/collapse-tasks-in-ganttview-datasheetview?forum=sharepointgeneral

The working answer appears to be at the bottom of the thread. It will require use of jquery and also the webpart identifier (e.g. WebPartWPQ2)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.