In the attached image, I have highlighted (in red) the second set of Column Headers in the first childband of row number 2 (highlighted in blue). How can I determine that these belong together programmatically? If I loop through the UIElements, I can get a BandHeadersUIElement but I don't know which UltraGridChildBand it should be associated with. Alternatively, if I use the UltraGridChildBand under row number 2 to get the column headers, it gives me the first set. How can I get to one from the other in a way that would indicate that these headers are for this childband?
I call into a recursive function passing in the RowColRegionIntersectionUIElement
public void DigIntoUIElement(UIElement uiElement) {
if( uiElement is BandHeadersUIElement){
//Do fancy stuff for each one
}
foreach (UIElement childElement in uiElement.ChildElements)
{ DigIntoUIElement(childElement); }
Unfortunately, the parent of the BandHeadersUIElement is the RowColRegionIntersectionUIElement, not it's parent row's UIElement.
So, now I have the BandHeadersUIElement, but I don't know to which "grid" it belongs. I know that it is Band 1, for instance, so it should be nested under some row somewhere. However, I don't know which row or where. I would have to search through all the rows in Band 0 to determine if they were expanded. However, if I just pass the BandHeadersUIElement's UltraGridBand into the indexer for the ChildBandsCollection of each row, it will give me back a childband. I won't know if this childband is the right one or not.