Active Query Builder support area

Schema Tree Item Captions

Avatar
  • updated
  • Completed

We are using Active Query Builder 2 (V 2.10.3.742) and we have a problem where in the initial load of the schema tree we alter the caption of the items( all are views) but if the user collapses and expands the tree the captions revert to their original values.

How do we control or prevent this behavior?

Thanks,

Avatar
Andrey Zavyalov, PM

Hello, Jaime.

Could you provide the source code of the described actions (altering captions of items) and the context of doing so. It will be much better if you could send us a demo project in which this problem could be reproduced.

Avatar
Andrey Zavyalov, PM

Hello, Jaime.

Thank you for the sample project.

Child MetadataStructureItems are destroyed when collapsed and re-created on expanding a node. You should handle the QueryBuilder.MetadataStructure.ItemBound event to change captions of child items for a node.

But I recommend you to consider adding alternate names to Metadata Container items. This way you can set them when they are loaded to the Metadata Container (using the QueryBuilder.MetadataContainer.ItemMetadataLoaded event), or even save them to XML file once and load when you open the Query Builder. Using alternate names you will see them everywhere in the Query Builder UI, and even in the SQL query text (you will get another SQL with real object names for execution against the database server). You can read more about this feature in this article: User-friendly database object and field names

By the way, please consider upgrading to the third version. You'll get much better and more customizable user interface, latest fixes for SQL engine, etc.