Filter 单击按钮上的角度ui网格过滤器

Filter 单击按钮上的角度ui网格过滤器,filter,angular-ui-grid,Filter,Angular Ui Grid,我是新来的。我们使用UI网格进行数据表示,可以自定义过滤过程。我想用这种方式对它进行定制,过滤是在点击按钮时形成的,而不是在按下键时形成的? 这就是我的想法 $scope.search = function (){ $scope.personCardGrid.useExternalFiltering = false; $scope.grid1Api.core.notifyDataChange(uiGridConstants.dataChange.ALL); $scope.g

我是新来的。我们使用UI网格进行数据表示,可以自定义过滤过程。我想用这种方式对它进行定制,过滤是在点击按钮时形成的,而不是在按下键时形成的? 这就是我的想法

$scope.search = function (){          
$scope.personCardGrid.useExternalFiltering = false; $scope.grid1Api.core.notifyDataChange(uiGridConstants.dataChange.ALL); 
$scope.gridApi.core.refresh() $scope.personCardGrid.useExternalFiltering = true;     
$scope.grid1Api.core.notifyDataChange(uiGridConstants.dataChange.ALL); 
$scope.gridApi.core.refresh() } 

关于

您需要为列定义自己的headerCellTemplate。在模板中,添加一个输入文本框和一个按钮。然后,在控制器中定义一个函数,并使用将过滤记录的外部作用域调用它

但是我需要它来处理多个参数,列1、列2、列3和按钮。你想把输入框放在哪里?在列标题中还是在表的顶部?与标题中的Regalar filter字段类似,最好在某些列标题中也添加该按钮。然后单击它,调用一个使用外部作用域过滤行的函数。这是不起作用的代码的和平$scope.search=function{$scope.personCardGrid.useExternalFiltering=false;$scope.grid1Api.core.notifyDataChangeuiGridConstants.dataChange.ALL;$scope.gridApi.core.refresh$scope.personCardGrid.useExternalFiltering=true;$scope.grid1Api.core.notifyDataChangeuiGridConstants.dataChange.ALL;$scope.gridApi.core.refresh }