Active Query Builder support area

Custom MetadataStructure

Avatar
  • updated
  • Completed

Hello,


I'm designing a custom structure in the metadata tree and I want all of my data sources to be under folders. 

So I created a metadatastructure tree using MetadataStructure.Items.Add
But all databases in the MetadataContainer are also added on tree after my folders automatically at runtime.
Is there a way to show only MetadataStructure items not with MetadataContainer items?




Avatar
Anonymous

Hello,


You need to select the root item of the structure and uncheck the "Load child metadata items automatically" option for it.

Avatar
Anonymous

There's an article in the Knowledge Book that briefly describes how the Database Structure tree is organized.

Avatar
BilalA

Ok, I couldn't get it well.

There is a screenshot below. 

I don't want the last two items to be shown.


Normally, I add the items to metadata first.

    MetadataItem server = queryBuilder.MetadataContainer.AddServer....

    database = server.AddDatabase...


Then under the folders, I link them to MetadataStructure items.

   dbItem = new MetadataStructureItem();
   dbItem.MetadataName = (string)dataRow["SRV_NAME"];

  ....


 


So there is no one root item. How to select the correct item to uncheck allowing child items?

Also it seems that there is a demo project. ("The new Metadata Structure demo project ..." says in the page you linked above) How can I get it? Thanks.







Avatar
Anonymous

Sorry, I was talking about the root item in the Metadata Editor tool. If you add metadata items programmatically, you should set the AllowChildAutoItems property of the QueryBuilder.MetadataStructure object (which actually is the hidden root MetadataStructureItem node) to false.

All demo projects are located in your Documents folder, "Active Query Builder 2 .NET Edition demo projects" sub folder.

Avatar
Anonymous

Using the Metadata Editor tool, you should select the root item of the structure and uncheck the "Load child metadata items automatically" option for it. 

If you add metadata items programmatically, you should set the AllowChildAutoItems property of the QueryBuilder.MetadataStructure object (which actually is the hidden root MetadataStructureItem node) to false.

There's an article in the Knowledge Book that briefly describes how the Database Structure tree is organized.