I have a double banded grid that I always want to be completely expanded; to accomplish this, I have been using the ExpandAll() method on the grid whenever RowInitialization happens. Since all child rows of the grid are always expanded, I wanted to get rid of the real estate that was being taken by the [+] expansion button. I set the indentation of the parent row to 0 which caused the row selectors to hide the [+] button, but a side effect of this was the RowConnectors are visible in the row selectors (e.g. there is a dotted vertical line that goes through each of my parent band's row selectors).
There has to be another way to do this. I ultimately want a hiearchical grid that is always expanded, the [+] button is never visible, the parent band is all the way to the left, and the row connectors are visible between the parent and child row selectors.
OT: Whats the correct name for the [+] expansion button?
Thanks.
You cannot. You can only turn off row connectors lines for the whole grid or leave them on. You can't bring the row selectors to the front and you can't hide the lines for a single band.
I don't believe its a matter of setting RowConnectors to be visible in certain scenarios (like per band); its more of an issue of how do I get the row connectors to not show through the RowSelectors.
In WinForms UI terminology, how do I force "Bring To Front" semantics on the RowSelectors over the RowConnectors?
The RowConnectors apply to the whole grid, you can't turn them off for a single band. At least I don't think you can. You might want to see if there's a RowConnectorStyle property on the Override, but I'm pretty sure it's just on the Layout.
It seems to me like using the extra column here for the row numbers is probably not going to work. Or at least that that approach is far more complicated than the alternative of using a DrawFilter to draw the text you want into the existing RowSelectors. In fact, I think a CreationFilter would be easier. You could turn on row numbers in the row selectors and then simply set the Text of the TextUIElement that already exists inside the RowSelectorUIElement.
Mike: I actually do want the row connectors to be visible, but I only want to see them when they connect a parent band to a child band.
The issue I am having is because I set the indentation of band[0] to 0, pushing it all the way to the left where they expansion indicator would have been (since the ExpansionIndicator is turned off, I end up having 5-10px of wasted real estate; the Indentation=0 fixes that).
The following PNG file shows the section of row connectors that I dont want to be visible (I have outlined the areas of interest in red):
Thanks for the help.
Yuo can turn off the RowConnectors using the RowConnectors property on the grid's DisplayLayout. Set it to None.
broccliman said:OT: Whats the correct name for the [+] expansion button?
ExpansionIndicators. There is also an ExpansionIndicator property on the Override.
You will probably also want to handle the BeforeRowCollapsed event and set e.Cancel to true so that a user can't collapse a row by double-clicking.