0
我應該在網格 我有了這個代碼顯示的圖像:angularjs NG-電網如何設置行或單元格高度
$scope.gridOptions = {
data: 'items',
enablePaging: true,
showFooter: true,
enablePinning: true,
totalServerItems:'totalServerItems',
pagingOptions: $scope.pagingOptions,
filterOptions: $scope.filterOptions,
showSelectionCheckbox: true,
multiSelect: false,
rowTemplate: '<div ng-style="{\'cursor\': row.cursor, \'z-index\': col.zIndex(),\'height\': \'150px\' }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell {{col.cellClass}}" ng-cell></div>',
columnDefs: [
{field: 'id', displayName: 'Id'},
{field:'firstname', displayName:'Name'},
{field: 'surname', displayName:'Cognome'},
{field: 'email', displayName:'Email'},
{field: 'address', displayName:'Indirizzo'},
{field: 'city', displayName:'Città'},
{field: 'zip', displayName:'Cap'},
{field: 'birthday', displayName:'Data di nascita'},
{field: 'joined', displayName:'Registrazione'},
{field: 'ip', displayName:'Ip'},
{field: 'url', displayName:'Prodotto',cellTemplate: '<div class="ngCellText" ng-class="col.colIndex()"><img src="./assets/base/img/products/{{row.getProperty(\'url\')}}" /></div>'},
]
};
});
所有作品圖像高度以及節選(它顯示有該行高度)
我已經與
rowTemplate: '<div ng-style="{\'cursor\': row.cursor, \'z-index\': col.zIndex(),\'height\': \'150px\' }" ng-repeat="col in renderedColumns" ng-class="col.colIndex()" class="ngCell {{col.cellClass}}" ng-cell></div>',
或者乾脆試圖把風格的DIV IMG模板
但它不起作用 所以有沒有辦法設置行/單元格的高度?
細胞不共享行的高度,它們默認爲30PX – brimble2010
爲單元格問題,添加與高度cellemplate:繼承像這樣:cellTemplate:'