我需要在ng-grid中的单个列中显示一组分层数据,并使用'+‘展开/折叠父行。
我看过它的分组功能,但似乎不适合我。
我的数据如下:
{
{name: 'Parent 1', children: {}},
{name: 'Parent 2', children: {{name: 'Child 1'}, {name: 'Child 2'}, {name: 'Child 3'}}},
{name: 'Parent 3', children: {}},
}我希望它在网格中显示如下,在同一列中:
Parent 1
Parent 2
Child 1
Child 2
Child 3
Parent 3使用ng-Grid实现这一点的最佳方式是什么?我应该为此使用一个替代的json对象吗?
提前感谢
发布于 2014-06-23 21:56:57
请看这个相关的问题和我写的一个做这种事情的柱塞器:http://plnkr.co/edit/fOMMXePQhWAF4DOnF3dW?p=preview
angularjs ng-grid: parent child relations between the rows (hide/show rows)
https://stackoverflow.com/questions/24365100
复制相似问题