Schema Expand
I had hoped that setting Expand Level to -1 would expand the schema nodes. The dbo node does not get expanded (see screenshot below). Am I using it wrong?
I had hoped that setting Expand Level to -1 would expand the schema nodes. The dbo node does not get expanded (see screenshot below). Am I using it wrong?
Ok thx! It works. I just want to see the table names so I'm using:
queryBuilder1.DatabaseSchemaView.Options.DefaultExpandMetadataType = MetadataType.Database | MetadataType.Schema;
queryBuilder1.DatabaseSchemaView.Options.DefaultExpandFolderNodes = true;
and also I noticed that after assigning the context I need to call InitalizeDatabaseSchemaTree as well:
queryBuilder1.SQLContext.Assign(context);
queryBuilder1.DatabaseSchemaView.InitializeDatabaseSchemaTree();
Works great. Thx!
Hello, Kay.
Sorry for the outdated settings form in our basic demos.
In version 3.5, we replaced the DefaultExpandLevel property with two new properties which are more predictable in the case of working with different database servers and DB schema grouping settings. There are now two properties in the QueryBuilder.DatabaseSchemaViewOptions group: DefaultExpandMetadataType property of MetadataType enum and DefaultExpandFolderNodes boolean property.
The DefaultExpandMetadataType property determines types of metadata objects that should be expanded by default. The DefaultExpandFolderNodes determines whether grouping nodes which don't correspond to any metadata object (such as "Tables", "Views" and "Procedures" nodes if MetadataStructureOptions.GroupByTypes = true) should be expanded or not.
You can set the DefaultExpandMetadataType to All to expand all the tree, but please note that if you display fields in the tree (MetadataStructureOptions.ShowFields = true), the process of initial expansion may take a long time, so maybe it is better to expand namespaces (Server | Database | Schema | Package) only.
There is a much more sophisticated properties form in the Full-featured MDI demo, I recommend you to learn the component using this demo. Note that in this demo, the Properties form is available only when you have a query window opened (Main menu "Options" - "Properties" item).