2016-02-09 37 views

回答

0

我看了一下github上的源代码。

您应该尝试编辑参数:$ scope.gridOptions.rowTemplate

如果您检查文件@https://raw.githubusercontent.com/angular-ui/bower-ui-grid/master/ui-grid.js,您将看到:

/** 
    * @ngdoc string 
    * @name rowTemplate 
    * @propertyOf ui.grid.class:GridOptions 
    * @description 'ui-grid/ui-grid-row' by default. When provided, this setting uses a 
    * custom row template. Can be set to either the name of a template file: 
    * <pre> $scope.gridOptions.rowTemplate = 'row_template.html';</pre> 
    * inline html 
    * <pre> $scope.gridOptions.rowTemplate = '<div style="background-color: aquamarine" ng-click="grid.appScope.fnOne(row)" ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ui-grid-cell></div>';</pre> 
    * or the id of a precompiled template (TBD how to use this) can be provided. 
    * </br>Refer to the custom row template tutorial for more information. 
    */ 
    baseOptions.rowTemplate = baseOptions.rowTemplate || 'ui-grid/ui-grid-row'; 
相关问题