kkudi
kkudi

Reputation: 1645

Hide or Remove ng-grid rows based on ng-class

I'm trying to hide/remove certain rows if they have a specific ng-class or if some boolean function returns true or false

I tried using rowTemplate with ng-class or ng-show/ ng-hide but this results in empty rows instead of removing the rows all together.

Note that I can't use filterText because my boolean function compares different cells to come to decision whether each row will be hidden/removed or not.

I've searched quite a bit and couldn't find anything, would appreciate if anyone has a solution to the above.

The following thread experiences a similar issue: How to get ng-grid to hide certain rows

Upvotes: 0

Views: 751

Answers (1)

Paul Whelan
Paul Whelan

Reputation: 16809

Could you use ng-show / ng-hide based on a boolean from your model?

These directives work by setting the element styles to display:block to show and display:none to hide as appropriate. They provide equivalent but inverse functionality for showing and hiding based on the expression you pass to them.

Upvotes: 0

Related Questions