Can we hide certain rows in the ng grid based on its values?

I have an array of values.

Questions = [
           {Name:"First", Status:"Valid"},
           {Name:"Second", Status:"Invalid"},
           {Name:"Third", Status:"Valid"},
           {Name:"Fourth", Status:"Invalid"}
           ];

      

I can display them in ng grid. But I can hide the line if the status value is invalid.

+3
angularjs ng-grid


source to share


1 answer


You need to set the property filterOptions

gridOptions



$scope.filterOptions = {
    filterText: 'Status:Valid',
    useExternalFilter: true
};

$scope.gridOptions = {
    data: 'Questions',
    filterOptions: $scope.filterOptions
};

      

+2


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics