Schema Expand

Answered

Comments

4 comments

  • Official comment
    Avatar
    Sergey Smagin (Product manager)

    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).

    Comment actions Permalink
  • Avatar
    Kay Bren

    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!

     

    0
    Comment actions Permalink
  • Avatar
    Kay Bren

    Just one more thing.

    Calling

    InitializeDatabaseSchemaTree

    seems to turn off my wait cursor. I usually turn the wait cursor on by calling:

    Cursor.Current = Cursors.WaitCursor;

    however the Wait Cursor turns off as soon as IntializeDatabaseSchemaTree is hit.

    0
    Comment actions Permalink
  • Avatar
    Sergey Smagin (Product manager)

    The bug with the reset of the cursor has been fixed.

    0
    Comment actions Permalink

Please sign in to leave a comment.