我有一系列值。
Questions = [
{Name:"First", Status:"Valid"},
{Name:"Second", Status:"Invalid"},
{Name:"Third", Status:"Valid"},
{Name:"Fourth", Status:"Invalid"}
];
我可以在ng-grid中显示这些内容。但是如果Status的值为Invalid,我可以隐藏一行吗。
答案 0 :(得分:2)
您需要设置filterOptions
gridOptions
属性
$scope.filterOptions = {
filterText: 'Status:Valid',
useExternalFilter: true
};
$scope.gridOptions = {
data: 'Questions',
filterOptions: $scope.filterOptions
};