[英]modify grid-data for external filter in ng-grid angularJS
我必须基于用于数据网格的外部通用过滤器来修改网格的数据。 我已搜寻并找出2种方法,
根据过滤器更改网格数据后,使用$scope.gridApi.core.notifydatachange(uiGridConstants.dataChange.ALL)
添加$scope.gridApi.grid.registerRowsProcessor( $scope.singleFilter, 200 );
在$scope.gridOptions.onRegisterApi
,然后在$scope.singleFilter
函数中,根据过滤器更改数据的可见性。
是否可以根据外部过滤器和列过滤器一起过滤数据?
如果是,我想知道哪种方法与列过滤一起使用会很好?
最好使用$scope.gridApi.core.notifydatachange(uiGridConstants.dataChange.ALL)
函数修改要过滤的数据。 由于ng-grid内部将$scope.gridApi.grid.registerRowsProcessor()
用于单列过滤器。 因此,如果我们尝试对其进行修改,则默认情况下列过滤器的功能将无法正常运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.