I've created a grid that shows a hierarchy using a dataset with a single table and a self-join. The hierarchy displays correctly, but I'm having a problem with column sizing. If I don't set column sizing to synchronized, the columns size correctly in each band, but they are not lined up. If I set it to synchronized, the columns line up, but the first is extremely wide (not even close to the correct size). Is there some other setting that I should be looking at? If I don't add the relation to the dataset, the columns also size correctly, but of course I don't get the hierarchy then. If it makes any difference, I'm also hiding the column headers in all bands other than band 0.
One other thing I had to do was to hide rows in band 0 that had a parent row. If I didn't do this, each row appeared twice - once in band 0 and once in the correct band. I did this based on an earlier forum post, although it's clear if the post was about grids or trees. I'm wondering if this indicates that I'm doing something else wrong.
Thanks for any assistance.
Hi,
When the columns are syncrhonized, the first column gets really big because of the indentation. Each level of the hierarchy is indented and so the first column in each child band has to get bigger and bigger as you go down in order for the text to fit.
It sounds like your data source is recursive, which means the grid will load 100 band by default, so that will create a very large first column. Try setting MaxBandDepth on the grid to a more reasonable number like between 5 and 8.
Another option would be to turn off the indentation. Loop through the bands and set Indentation on each band to 0.