Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用Angular js设置同步网格的最小高度?_Javascript_Angularjs_Syncfusion - Fatal编程技术网

Javascript 如何使用Angular js设置同步网格的最小高度?

Javascript 如何使用Angular js设置同步网格的最小高度?,javascript,angularjs,syncfusion,Javascript,Angularjs,Syncfusion,我正在当前项目中使用Angularjs开发syncfusion网格(第三方自定义控件) 我有一个关于高度的小问题。我已经做了一些角度代码来设置网格的高度(我使用“e-scrollsettings-height”属性来这样做),但当网格为空时,它将使网格为空,您可以看到附加的屏幕截图以了解其意义 一件事是我不想在我的网格中使用分页 我想可能最小高度有一些属性,但我找不到任何相关属性。最后我得到了一个答案,所以我在这里为其他人发帖 鉴于: <div class="gridStyle" ng-

我正在当前项目中使用Angularjs开发syncfusion网格(第三方自定义控件)

我有一个关于高度的小问题。我已经做了一些角度代码来设置网格的高度(我使用“e-scrollsettings-height”属性来这样做),但当网格为空时,它将使网格为空,您可以看到附加的屏幕截图以了解其意义

一件事是我不想在我的网格中使用分页


我想可能最小高度有一些属性,但我找不到任何相关属性。

最后我得到了一个答案,所以我在这里为其他人发帖

鉴于:

<div class="gridStyle" ng-init="getList()" ma-cmis-grid-directive id="cmisGrid" e-scrollsettings-height="{{maximumGridHeight}}" e-actioncomplete="actioncomplete"></div>
$scope.maximumGridHeight = 330;
$scope.actioncomplete = function (args) {
    if (!this.initialRender && args.requestType == "refresh") {
            var height = Math.ceil(this.getRowHeight() * this.model.currentViewData.length);
            this.option("model.scrollSettings.height", height > $scope.maximumGridHeight ? $scope.maximumGridHeight : height);
        }
        else if (args.requestType != "sorting" && this.model.selectionType == "single")
        {
            var height = Math.ceil(this.getRowHeight() * this.model.currentViewData.length);
            this.option("model.scrollSettings.height", height > $scope.maximumGridHeight ? $scope.maximumGridHeight : height);
        }
}