嵌套NG-网格? [英] Nested ng-Grids?

查看:166
本文介绍了嵌套NG-网格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以做一个嵌套的NG-网格。这样的事情,有没有可能。这里的plunker:

Can we make a nested ng-grid. something like this, is it possible. here's plunker:

http://plnkr.co/edit/hYuFfxLR38LA0clIkF48?p=$p$ PVIEW

我也尝试使用这样一来,templateUrl。

I have also tried doing this using , templateUrl.

任何建议,修改plunker或链接?

any suggestions, modifications to plunker or links ?

推荐答案

是的,这可能是工作的,虽然它并没有太大的意义。

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.

然后你父格告诉我们另一个的rowHeight比默认30像素。

Then you have to tell the parent grid to us another rowHeight than the default 30px.

不要将网格类适用于celltemplate。

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>'
        }]
    };

下面是一个 Plunker

正如你可以看到有两排带有隐约猜到了高度和两个相同的子格带有滚动条。

As you can see the there are two rows with a vaguely guessed height and two identical child grids with scrollbars.

我不知道你是怎么想拥有的childgrids不同的数据。

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.

这篇关于嵌套NG-网格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆