Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
920
programmatically select an item in explorerBar
posted

I don't understand why nobody is responding to this.  Do you need more information?

This seems like this should be a simple thing to do and should have a simple solution.  If this control does not have a simple way to programmatically select it's list objects then it needs one.  Can I at least get feedback that says you don't know how to do this so that I can move on?

I try this:
_explorerBar.ActiveItem = _explorerBar.Groups[0].Items[0];

but get this Exception:
"ActiveItem cannot be set - specified Item cannot be activated! (Item may be disabled or have a style that is not activatable like Separator or Label)"

_explorerBar.Groups[0].Items[0] is this:
UltraExplorerBarItem item = new UltraExplorerBarItem(sectionId.ToString());
item.Text = sectionText;
_explorerBar.Groups[0].Items.Add(item);

 

What am I missing?

Parents
No Data
Reply
  • 69832
    Offline posted

    Assuming the item is not a separator/label, the likeliest explanation is that the group is not expanded or selected, depending on the value of the control's Style property. Styles like ExplorerBar support the notion of expandable groups, and a group must be expanded before an item therein can be activated. Styles like OutlookNavigationPane support the notion of selectable groups, whereby only one groups is selected at any given time, and only within selected groups can the items therein be activated.

Children