jQuery UI Widgets › Forums › Navigation › Tree › Hierarchical Tree
Tagged: angular tree, bootstrap tree, hierarchy, javascript tree, jquery tree, jqwidgets tree, jqxtree, Tree
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 9 years, 2 months ago.
-
AuthorHierarchical Tree Posts
-
Hello Team,
I have a JSON in below format:
var projectResources = [
{
“projectId”: 2, “projectName”: “Project1”,
resources: [
{ “resourceId”: 8, “Name”: “Pratibha Pandey”, “Designation”: “ATL” },
{ “resourceId”: 9, “Name”: “Pratibha Pandey”, “Designation”: “ATL” },
{ “resourceId”: 10, “Name”: “Pratibha Pandey”, “Designation”: “ATL” },
{ “resourceId”: 11, “Name”: “Pratibha Pandey”, “Designation”: “ATL” }]
},
{
“projectId”: 2, “projectName”: “Project2”,
resources: [
{ “resourceId”: 12, “Name”: “Pratibha Pandey1”, “Designation”: “ATL” },
{ “resourceId”: 13, “Name”: “Pratibha Pandey1”, “Designation”: “ATL” },
{ “resourceId”: 14, “Name”: “Pratibha Pandey1”, “Designation”: “ATL” },
{ “resourceId”: 15, “Name”: “Pratibha Pandey1”, “Designation”: “ATL” }
]
}
];I need to create a jqxTree out of this hierarchy.
Can you please help me up with creating the source, dataAdapter, and recordsHierarchy for this JSON. As I can not change the format of JSON.
Thanks,
PratibhaHello Pratibha,
The data from JSON is not very consistent.
Please take a look this example: http://jsfiddle.net/txhi/y3zgr3aw/
In case if you use the example above there is not need to usedataAdapter
.
If you would like to read more about dataAdapter please take a look this article:
https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdataadapter/jquery-data-adapter.htm?search=
Below is one demo with hierarchical structure:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/events.htm?arcticBest Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.