The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
HNHarinath Navaneethakrishnan Syncfusion Team January 6, 2023 01:05 PM UTC
Hi Peter,
Currently, we have no support to collapse and expand the groups programmatically, however, you can achieve your requirement by accessing the expander control of the Cardview using a visual tree and changing its IsExpanded property.
Code Snippets:
private void FindExpanders(DependencyObject parent)
{ int count = VisualTreeHelper.GetChildrenCount(parent); for (int i = 0; i < count; i++) { var child = VisualTreeHelper.GetChild(parent, i); if (child is Expander expander) { expander.IsExpanded = false; } else { FindExpanders(child); } }
}
We have created a simple sample based on your requirement. Please refer to the sample for your reference.