jQuery UI Widgets › Forums › Navigation › Tree › nobodys talking about angular_jqxtree
Tagged: #jquery-tree, angular tree, angular2 tree, bootstrap tree, javascript tree, jqwidgets tree, jqxtree, typescript tree
This topic contains 16 replies, has 3 voices, and was last updated by rlopez 5 years, 2 months ago.
-
Author
-
Hello junior,
Unfortunately, I have not noticed that you use the same variable for two different things.
If this.beverages is an Array with data and want to use the DataAdapter need to set this to localdata field.
Please, take a look at this demo (localdata):
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/treebindingtojson.htm?lightAnother option is to load data from the server then use url (String) and set a concrete URL address.
Please, take a look at this demo (url):
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/treebindingxml.htm?lightBest Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi.
I’m starting with jqWidgets.
Hope this helpssource: any; dataAdapter: any; records: any[]; entidadRolTipoTree: any[]; @ViewChild('myTree') myTree: jqxTreeComponent; getEntidadRolTipoTree(): any { this.pgql.query(this._service.entidadRolEstructuraQuery(1)).subscribe(response => { if (response.ok) { this.entidadRolTipoTree = response.body.data.getEntidadRolTree.nodes; this.source = { datatype: 'json', datafields: [ {name: 'id'}, {name: 'parentid'}, {name: 'text'} ], id: 'id', localdata: this.entidadRolTipoTree }; // create data adapter & perform Data Binding. this.dataAdapter = new jqx.dataAdapter(this.source, {async: true, autoBind: true}); // specifies the mapping between the 'text' and 'label' fields. this.records = this.dataAdapter.getRecordsHierarchy('id', 'parentid', 'items', [{name: 'text', map: 'label'}]); this.myTree.source(this.records); } }, err => { throw err; }); } ngOnInit() { this.getEntidadRolTipoTree(); }
- This reply was modified 5 years, 2 months ago by rlopez.
-
AuthorPosts
You must be logged in to reply to this topic.