I have a flexible height Text Gallery, the DataSource for this Gallery has several fields. I'm using one of these fields as the name of a group of Users. I would like to hide or show Gallery items (not just individual textboxes) based on the value of one of the fields in the Gallery.
For example one of the textboxes is linked to a field called group, if the value of group=admin then hide item. In addition to that, I would also like to highlight the item using template fill, so something like If group=admin, then template fill is blue.
Any suggestions, under what property would I place the code?
You can hide/show items from the data source in your gallery by using a filter expression in the gallery's Items property that filters out those that you don't want. For example, for this data source:
I have this application, with a listbox showing some categories to display in the gallery, and the items in the gallery itself:
Those are the formulas that I've used to show/hide items in the gallery, and to change the template fill depending on the data itself. You can see the expression using the If function to highlight the items depending on a value a property in the data row.