将ng-grid设置为垂直布局以使用行标题而不是列标题

时间:2014-09-23 21:19:00

标签: angularjs ng-grid

我有一个ng-grid 2.0.12,我希望将第一列行作为标题。所以基本上有一个垂直表。有没有办法在ng-grid中实现这个目标?

.controller('ReportA', function($scope,$http, DaService, reportFactoryTable, trendReportFactoryTable) {

    $scope.filterOptions = {
        filterText: "",
        useExternalFilter: true
    }; 

        $scope.gridOptions = {
        data: 'aData',

        jqueryUITheme: true,
        enablePinning: true, 
        showFooter: true,
        enableRowSelection: false,     
        filterOptions: $scope.filterOptions, 
        plugins: [new ngGridCsvExportPlugin()],  
        columnDefs: [
        {field: "item1", width: 120 },
        {field: "item2", width: 120 },
        {field: "item3", width: 120 },
        {field: "item4", width: 120 },
        {field: "item5", width: 120 },

        ]
    };

$scope.toggleCol= function(i){
    $scope.gridOptions.$gridScope.columns[i].toggleVisible();
};

0 个答案:

没有答案