I have an ArrayCollection which is a dataProvider to the DataGrid. The ArrayCollection may look like that:
{Name: Bob; LikesIceCream:YES},
{Name: Carl; LikesIceCream:NO},
{Name: Ed; LikesIceCream:NO}
I want to have a checkbox, which would make the DataGrid show either all people when it is checked, or only those who have a property LikesIceCream:NO when it is not checked. How do I achieve that?
You can use filterFunction property of ArrayCollection.
Write your own function that will filter collection:
Set collection filterFunction property
Refresh collection initially and after check box change