We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Collapse a ressource group on/after loading

I've got a number of grouped ressources, similar to your sample

Upon loading of the schedule, I'd like to collapse all groups that are not the primary group of the User. I've tried around a bit, e.g. by trying to simulate a click event for elements by class e-rsssource-collapse, but can't quite get it to work.

Using the sample above, how could I collapse "Project 2" on or after the schedule has loaded?


3 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team February 12, 2019 04:12 AM UTC

Thank you for contacting Syncfusion support. 
We can display the desired parent resource in collapse state using expandedField and kindly refer the below sample. 
      field: 'ProjectId', title: 'Choose Project', name: 'Projects', 
      dataSource: [ 
        { text: 'PROJECT 1', id: 1, color: '#cb6bb2' }, 
        { text: 'PROJECT 2', id: 2, color: '#56ca85', expanded: false }, 
        { text: 'PROJECT 3', id: 3, color: '#df5286' } 
      textField: 'text', idField: 'id', colorField: 'color', expandedField: 'expanded' 
Above sample is for your reference and the same can be achieved in Core. 

ST Stefan February 12, 2019 08:16 AM UTC

Thank you Karthigeyan,
I've been through the documentation a good number of times and could have sworn this wasn't there for long - maybe I need glasses.

Outstanding support, as always!
Kind regards

KK Karthigeyan Krishnamurthi Syncfusion Team February 12, 2019 09:28 AM UTC

We are happy that our solution fulfilled your requirement. 

Live Chat Icon For mobile
Up arrow icon