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.
VSVenkatesh S Syncfusion Team December 30, 2009 12:36 PM UTC
Hi Ron,
Thank you for your interest in Syncfusion products.
The child nodes can be retrieved before their parent node.
Following code snippet can be used to acheive your requirement
[C#] Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Dim allCheckedNodes As New List(Of TreeViewNode)() childparent(TreeView1.Items, allCheckedNodes) For Each tv As TreeViewNode In allCheckedNodes Text1.Text += tv.Text Next tv End Sub
Protected Sub childparent(ByVal listItems As IList, ByVal list As List(Of TreeViewNode)) For Each tv As TreeViewNode In listItems If tv.HasSubNodes Then childparent(tv.Items, list) End If If tv.Checked AndAlso tv.ShowCheckBox Then list.Add(tv) End If Next tv End Sub