角NG-网格行高度 [英] Angular ng-grid row height

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

问题描述

有任何方法,根据其内容来应用行的高度为ng栅。
有哪些改变所有行的高度一个选项的rowHeight。但我想根据其内容的动态行高。

is there any way to apply the height of the row in ng-grid according to its content. there is one option rowHeight which is changed the height of all row. But I want dynamic row height according to its content.

以下是Plunker我已经在这个我已经使用cellTemplate插入教育领域,但我想根据教育领域的细节,以增加行高。

Following is the Plunker I have made, in this I have used cellTemplate to insert Education field, But I want to increase the row height according to education field detail.

http://plnkr.co/edit/tQJNpB?p=$p$pview

根据该链接它是不可能的:
[1] <一个href=\"https://github.com/angular-ui/ng-grid/issues/157\">https://github.com/angular-ui/ng-grid/issues/157

According to this link it is not possible: [1]https://github.com/angular-ui/ng-grid/issues/157

但是,如果有人找到解决办法......

But if anyone find the solution.....

推荐答案

这些课程将使表充当实际的表,使用显示表行和表单元格中。

These classes will make the table act as actual table, using display table-row and table-cell.

.ngCell  {
  display : table-cell;
  height: auto !important;
  overflow:visible;
  position: static;
}

.ngRow {
  display : table-row;
  height: auto !important;
  position: static;
}

.ngCellText{
  height: auto !important;
  white-space: normal;
  overflow:visible;
}

请注意,这是由IE8及以上支持。它也覆盖了整个纳克网格类所以这将是明智的做法是在用需要的基础:

Please note that this is supported by IE8 and up. It's also overriding the entire ng grid classes so it will be wise to use on a "need to" base:

#myTableId .ngCell {...}
#myTableId .ngRow {...}
...

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

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