Tag property
Each row has a Tag property of type object where you can store a custom object.
Setting the Tag property of a row
Setting the Tag property of cells in CellFormatting event.
Collapsing all rows with the specified tag
The most natural place to use the tag is in some of the row/cell events. For example, to make the content of certain cells invisible use the following code:
Cells also have Tag property but it differs substantially from rows one because of the UI Virtualization. Cells are reused and when you scroll the tag value remains unchanged while cell data value is updated.