0

我们在 grid-ui 中有 rowtemplate(),我们可以在 slick grid 中有相同的功能吗?

我必须合并备用行并在该合并行中显示数据。

在 grid-ui 中使用 rowTemplate,我需要在光滑网格中替代此功能。

// you could of course just include the template inline in your code, this example shows a template being returned from a function
this.rowTemplate = function() {
    return '<div>' +
        '  <div ng-if="row.entity.merge">{{row.entity.title}}</div>' +
        '  <div ng-if="!row.entity.merge" ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ng-class="{ \'ui-grid-row-header-cell\': col.isRowHeader }"  ui-grid-cell></div>' +
        '</div>';           
}
4

1 回答 1

0

不要以为有什么办法可以渲染整行,但是 column.formatter 属性可以用来控制单元格渲染。

这是一个极端的例子:http: //6pac.github.io/SlickGrid/examples/example8-alternative-display.html

于 2017-02-24T09:53:05.540 回答