Not quite sure what kind of display / layout you have in mind but I played around with that thought a bit. Just a few ideas, nothing that I really tried (don't have a server at hand right now):
Assuming that you wish to hide all column headers when all categories are fully collapsed one way you could go is to use some client side scripting setting an initial display:none
styling for the data table's <thead>
element; or if you can't reach thead for whatever reason you might as well address all column headers through their separate styleClass xspPanelViewColumnHeader
.
Reacting to the the expand / collapse events might be a bit tricky;
Speaking of more control: all in all it might be a much better idea not to go for a view panel at all. You could instead use a <xp:dataTable>
or even <xp:repeat>
control which means more work but is giving you much more control over what you can achieve here. Or you even go for something like a b jQuery data table.