Hello,
I would like to layout a grid with several bands like the one below; the key thing is that the columns of all levels are aligned and that also the row expand indicators are shown. I have tried to set the Band.Indent=0 but then row expand indicators are not shown.
Thanks
Hi,
You might want to consider using UltraTree, instead and setting the Style to OutlookExpress. That will more closely resemble what you have here.
To do this in the WinGrid, Indent is not really what you want, because Indent is horizontal spacing in front of the row. What you want is to remove the spacing between rows.
grid.DisplayLayout.InterBandSpacing = 0;
There's no easy way to put the expansion indicators inside the row like you have here, but you could do it using a CreationFilter.
Thanks Mike,
If I would use a tree it is possible to make some cells editable?
Yes, WinTree supports editing in the latest version (or any recent version).
It doesn't have filtering, summaries, printing, or exporting like the WinGrid, though. So if you need those, you should stick with the grid.
What version of the UltraTree supports editing? Also is there any guide/example of how should the tree be configured to achieve that layout?
If you installed the samples with NetAdvantage then the best thing for you to do is check out the recursive data binding sample. It will be in a folder something like this:
\20XX.X\Samples\WinTree\CS\DataBinding (Recursive) CS
I'm not sure in exactly what version editing was added to the tree, but it was a long time ago and I'm pretty sure it was only a single release after we added multi-column support. to enabled editing the sample, there are two things you have to do.
In the Form_Load, add this code:
this.ultraTree1.Override.CellClickAction = CellClickAction.EditCell;
And in the ultraTree1_ColumnSetGenerated event, add this:
e.ColumnSet.AllowCellEdit = AllowCellEdit.Full;