Topic: dynamically adding rows to treetable
Aztec01 priority asked 2 years ago
I'm trying to construct a treetable dynamically by adding rows to the table.
The html part:
....
The js part:
$(".table tbody").append(""+jsonInput.value1+"")
while I see the data displayed to the table, I can't see the drop down arrow against the row. Upon inspecting the page of the example code, I see that a number of styles and classes added to the element that presents the drop down which are not added when I add the rows dynamically. How do I force the table to reapply the classes if I'm adding rows using jquery?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.11.0
- Device: desktop
- Browser: all browsers
- OS: windows 10
- Provided sample code: No
- Provided link: No
Michał Duszak staff commented 2 years ago
Hello, there is no method provided to add rows dynamically to the Treetable. But you can do it with the update() function in Datatables https://mdbootstrap.com/snippets/standard/m-duszak/3188208#js-tab-view