IgniteUI / igniteui-angular

Ignite UI for Angular is a complete library of Angular-native, Material-based Angular UI components with the fastest grids and charts, Pivot Grid, Dock Manager, Hierarchical Grid, and more.
https://www.infragistics.com/products/ignite-ui-angular
Other
571 stars 161 forks source link

Use igx-tree-grid instead of igx-grid #4411

Closed amrit-moomie closed 5 years ago

amrit-moomie commented 5 years ago

Question

With new igx-tree-grid which is separate module and component I realized if I just set the childDataKey to a value that doesn't existing in data object then the grid with render as non-tree structure like a igx-grid. Working example here https://angular-wandvj.stackblitz.io Code: https://stackblitz.com/edit/angular-wandvj

My questions is that as IgxTreeGridComponent extends IgxGridBaseComponent, can I just use the tree grid and set my childDataKey to get the desired tree-grid or regular grid. Is this going be OK moving forward? Any functionality that I will miss in current of future releases?

DiyanDimitrov commented 5 years ago

@ammritt, The only difference in the functionality between the igx-grid and the igx-tree-grid is that the igx-tree-grid does not support grouping. Technically you could use the IgxTreeGridComponent for non-tree structures, but using the IgxGridComponent would have a bit better performance since the IgxTreeGridComponent has some additional logic for handling the tree structure.

SlavUI commented 5 years ago

@ammritt I'm closing this as answered re open if you have more questions :)