Angular ng-grid row height

前端 未结 6 2136
梦谈多话
梦谈多话 2020-12-09 09:29

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

6条回答
  •  渐次进展
    2020-12-09 09:52

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

    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 {...}
    ...
    

提交回复
热议问题