When I try to register the TreeNodesCollection of an UltraTree as a CAB-UIExtensionSite like this
RootWorkItem.UIExtensionSites.RegisterSite(UIExtensionSiteNames.WindowTemplatesTreeNodes, this.Shell.WindowTemplateNodes);
I get the following error message:
"No UIElementAdapterFactory register for type Infragistics.Win.UltraWinTree.TreeNodesCollection."
I checked with your documentation and it says
UltraTreeNodeThe following objects can be registered as extension sites: Nodes collection WinTree™ control individual UltraTreeNode element
UltraTreeNodeThe following objects can be registered as extension sites:
Do I have to register a special AdapterFactory as stated in the error message or what else might I do wrong?
Thanks in advance and best regards, Gerald
Below is the code for registering the AdapterFactory for the tree. I believe this is no longer necessary in the newer versions but I haven't verified if that is the case.
IUIElementAdapterFactoryCatalog catalog = this.RootWorkItem.Services.Get<IUIElementAdapterFactoryCatalog>();catalog.RegisterFactory(new TreeUIAdapterFactory()); RootWorkItem.UIExtensionSites.RegisterSite("tree", this.Shell.tree);
As a follow-up, if you are using NetAdvantage 8.1, you do not need to write the extra line of code Sung mentioned; you will be able to register the TreeNodesCollection as a UIExtensionSite without having to register the associated UIAdapterFactory first.