So I have a question regarding an optimal solution for a problem facing my current project.

First a bit about what I have so far:

I have a database of hierarchical data that is being displayed in a tableview. I am using row spans to show the hierarchy, i.e. item 1 (column 0) has children 1.1 and 1.2 (column 1), item 1 has to span 2 rows so that its height encompasses both its children in the subsequent column. We do some calculations on the data to figure out what the spans should be in a pretty efficient manner, and that all seems to work fine.

The issue I've come across stems from how this is really not the kind of data that tableview was built to display, so we end up with a lot of unnecessary white-space by utilizing spans. A more accurate way to display the data would be something analogous to nesting tables in html, rather than using spans.

Here are some images to better illustrate what I'm talking about.

Current Appearance:
currentAppearance.png

Preferred Appearance:
preferredAppearance.png

As you can see in the first image, my parent items are sizing themselves to include the rows they need to span in order to encompass their children, even if their text is long enough to encompass their children without the empty rows that are hidden behind the cell. Also the child items are sizing themselves to line up with the row the parent is on, and thus end up with a larger cell than they need if the parent text is longer.

So my question is for those that understand the inner workings of the view and delegate classes better than I do. How far would I have to go to achieve my desired result? It seems like I'd end up re-implementing TableView's paint method entirely and then probably spend ages fixing all the support methods that I break by drawing my table this way. I'm not totally opposed to directly drawing stuff if I need to, I can understand the code well enough, but I have a feeling this would be a "solution" that would cascade into other systems and probably eat up significant development time. Also I know our product owner, and this is definitely going to be an issue that they will want to be addressed, so if I'm going to argue the "not worth the time and effort for relatively little gain" angle then I'd like to at least do so from a place of knowledge and understanding.

Any light you can shed on this problem is appreciated.