Display Hierarchical TreeView from Database using jQuery in ASP.Net

on Jun 24, 2022 01:32 AM

How to display Hierarchical Tree view.

I have members and their referral member's id stored in a database.

I need a JavaScript code to display parent and child tree from the database.

Parent ID CHild Id Child Name
1 48 Tsibu Richard
1 42 Amponsah Owusu Sheila
1 38 Arthur Sophia
48 150 Amosah Nogrow Stephany
48 151 Ofosuah Asante Emmanuella
42 152 Abass Nadia
42 153 Amissah Olivia
42 154 Saah Efua
Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Jun 24, 2022 04:35 AM

Refer below link.

jQuery jsTree in ASP.Net from database example

Here in the example DataTable is used for creating the Tree. You need to replace the code with Database code.