问题
Can we make a nested ng-grid. something like this, is it possible. here's plunker:
http://plnkr.co/edit/hYuFfxLR38LA0clIkF48?p=preview
I have also tried doing this using , templateUrl.
any suggestions, modifications to plunker or links ?
回答1:
Yep, that might be working, although it doesn't make much sense.
First of all you have to supply some data to the parent grid so that at least one row is rendered.
Then you have to tell the parent grid to us another rowHeight than the default 30px.
Don't apply the grids class to the celltemplate.
$scope.gridOptions = {
data: 'facdata',
rowHeight: '90',
columnDefs: [{
field: 'examname',
displayName: 'Exam Name',
cellTemplate: '<div ng-grid="gridOptions1" ng-bind="row.getProperty(col.field)"></div>'
}]
};
Here is a Plunker
As you can see the there are two rows with a vaguely guessed height and two identical child grids with scrollbars.
What I don't understand is how you want to have different data for the childgrids.
Please explain more what exactly you want to achieve.
来源:https://stackoverflow.com/questions/24008491/nested-ng-grids