collapse al parent task

Good morning,

is it possible to collapse all parent task programmatically?

I can't find a way...

Thank You in advance

Best regards

M


3 Replies 1 reply marked as answer

VM Vidyalakshmi Mani Syncfusion Team January 29, 2024 01:52 PM UTC

Hi Marco,


To collapse and expand parent tasks programmatically, utilize the `CollapseAllNodes` and `ExpandAllNodes` methods, as shown in the following code snippet.


 

private void CollapseNodes(object sender, RoutedEventArgs e)

{

    this.Gantt.GanttGrid.CollapseAllNodes();

}

 

private void ExpandNodes(object sender, RoutedEventArgs e)

{

    this.Gantt.GanttGrid.ExpandAllNodes();

}

 


We have prepared a simple sample demonstrating this; please refer to the attached sample.


If you have any further questions or need assistance, feel free to ask. We're here to help!


Regards,

Vidyalakshmi M.



Attachment: WpfGantt_991f982a.zip

Marked as answer

MD marco del frate January 31, 2024 11:58 AM UTC

Thnk You,

it's perfect



VM Vidyalakshmi Mani Syncfusion Team February 1, 2024 11:43 AM UTC

Hi Marco,


We’re Glad that your issue is resolved!!  Please let us know if you need further assistance. As always, we are happy to help you out.  


Regards,

Vidyalakshmi M.


Loader.
Up arrow icon