Display Tree View data in Drop Down
Asked on April 12, 2018
Hello,
I am working on Angular 2 project to display tree view data in drop down. I am retrieving data in the following format.
[{"pk_location_id":1,"locationname":"Oman","parent_location_id":0,"has_children":true},
{"pk_location_id":2,"locationname":"Muscat","parent_location_id":1,"has_children":true},
{"pk_location_id":3,"locationname":"Seeb","parent_location_id":1,"has_children":false},
{"pk_location_id":4,"locationname":"Ruwi","parent_location_id":2,"has_children":false}]
In drop down it should display like "Oman" under "Muscut" and "Seeb" should display and "Muscat" under "Ruwi" should display. Like below image.
Can anyone help me out in this.
Thanks
Amruta Wandakar
I am working on Angular 2 project to display tree view data in drop down. I am retrieving data in the following format.
[{"pk_location_id":1,"locationname":"Oman","parent_location_id":0,"has_children":true},
{"pk_location_id":2,"locationname":"Muscat","parent_location_id":1,"has_children":true},
{"pk_location_id":3,"locationname":"Seeb","parent_location_id":1,"has_children":false},
{"pk_location_id":4,"locationname":"Ruwi","parent_location_id":2,"has_children":false}]
In drop down it should display like "Oman" under "Muscut" and "Seeb" should display and "Muscat" under "Ruwi" should display. Like below image.
Can anyone help me out in this.
Thanks
Amruta Wandakar