Hi,
Is there any way we can embed igx-treegrid within igx-combo because I want to display a tree like structure in my combo box and I was hoping that I can find an example on how to use tree grid in ng-Template section within igx-combo.
I would really appreciate a working link of some sample example.
Thanks
Sean
Hello Sean,
The main aim of IgxCombo is to combine an input with IgxDropDown. As you know IgxDropDown is a component which displays a scrollable list of items. Looking at your question you need a drop down which should display a tree structure. If this is what you need you should not use IgxCombo, neither IgxDropDown as you do not need a drop down with scrollable list of trees. What you can use is IgxToggle directive. If you are using a button to open and close the drop down your markup should look something like this:
<button igxButton="raised" igxRipple [igxToggleAction]="toggle">Open tree grid</button> <div igxToggle #toggle="toggle"> <igx-tree-grid #grid1 [data]="data" childDataKey="childDataKey" primaryKey="ID" [width]="'900px'" [height]="'500px'"> <!-- Add your columns here --> </igx-tree-grid> </div>
Please let me know if this is what you need or if you have any additional questions on this matter.
Hello Milko,
I really appreciate this that you have suggested me some way out of this situation but I am afraid this is not required.
I have to use to the control among filter controls in different forms and pages so I have to make it look like IgxCombo or IgxDropDown to show the user the selected values in tree grid.
That would be great if we can find out this kind of solution.
Hi Sean,
Thank you for your feedback and picture provided.
Looking at your picture it seems that you need tree component. Something like Material Tree. Right now we do not have such component. Implementing this in IgxCombo via custom item template will require a lot of custom logic like item expanding/collapsing; synchronize parent-child item selection and so on.
After working on this case having a tree has been determined as a new component idea. You can suggest new component idea for future versions by creating an issue in our public GitHub repository.
Thank you in advance to submitting your component idea.
Any progress on this tree like combo component? I would be very interested in using it.
Please vote on this idea if you are interested
www.infragistics.com/.../angular-dropdown-tree