How do I hide the row expanders (or How do I share a model between tree and table view)?
As there are two types of model – TreeStore and ListStore and only one type of view – TreeView, it is not obvious how to share a model between two views. The trick is to use one model and one view but to control the visibility of row expanders. All we have to do is to add a first dummy column (with no model column equivalent), keep it hidden all the time and switch the ‘expander-column’ property between this and next column (having ‘expander-column’ set to column that is not visible effectively hides the expanders). Please note the user has no way how to expand/collapse the rows when the expanders are hidden – it is useful to expand all rows prior to hiding the expanders.