如何动态更改列宽或在列中滚动

时间:2019-01-08 17:08:25

标签: javascript angularjs grid

我正在尝试添加滚动条或动态更改AngularJS网格中列的宽度。下面是网格的代码

    $scope.resultsGridOptions = {
        enableSorting: true,
        enableHorizontalScrollbar: 1,
        columnDefs: [
            { field: 'Barcode' },
            { field: 'BacterialGrowth', displayName: "Growth" },
            { field: 'Control', displayName: "Control Sample" },
            { field: 'Comment', displayName: "Comments", width: 250 }
        ],
        onRegisterApi: function (gridApi) {
            $scope.grid1Api = gridApi;
        }
    };

但是,当“注释”列中的字符更多时,它不会自动让我滚动查看内容或重置其大小。怎么做

enter image description here

0 个答案:

没有答案