Topic: Treeview with dynamic data

arnaud.lallain priority asked 10 months ago


We are trying to use treeview with dynamic data, but we cannot find anything about that in the documentation,

There is a library, and it works using : $('#treeView').treeview({ data:, enableLinks: true });

Is there something similar in the mdb treeview ?

Thank you,

Mikołaj Smoleński staff commented 10 months ago

In such case I suggest to use the latest MDB5 Treeview plugin, which has an optional JavaScript initialization and there is an option to update data structure after the dynamic data changes.

Here's the documentation:

Keep coding,  Mikołaj from MDB

arnaud.lallain priority commented 10 months ago

So if I am getting this right, there is no way we can acheive that using the MDB4 ?

Mikołaj Smoleński staff commented 10 months ago

Treeview in MDB4 works only for the HTML elements. To load dynamic data you will have to: 1. Fetch the data via JS 2. Create HTML elements via JS with the same template as static HTML treeview structure. 3. Init the Treeview plugin

Keep coding,  Mikołaj from MDB

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: MDB4 4.5.0
  • Device: Laptop
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes