Active Query Builder support area

BeginUpdate/EndUpdate for the Schema tree

Avatar
  • updated
  • Completed
When loading a really large schema, I'd like to call BeginUpdate/EndUpdate on the Schema Tree so it doesn't try to paint while adding items, to speed it up. I can't figure out exactly how to reference the tree itself, or if there's another way to do it. I've tried calling

queryBuilder1.BeginUpdate();
queryBuilder1.InitializeDatabaseSchemaTree();
queryBuilder1.EndUpdate();

and

queryBuilder1.DatabaseSchemaTree.BeginUpdate();
queryBuilder1.InitializeDatabaseSchemaTree();
queryBuilder1.DatabaseSchemaTree.EndUpdate();

but neither way suppresses the Schema tree updating. Is there a way to suppress updates of the Schema tree when calling InitializeDatabaseSchemaTree for a really large schema?
Avatar
TreeView's BeginUpdate/EndUpdate are already called internally but they work odd in the WinForms tree view implementation.
Perhaps you better avoid the full tree loading?
You can use DatabaseSchemaTreeOptions.DefaultExpandLevel to limit the initial tree expanding, so deeper nodes will be expanded by user on demand.

Avatar
JLathem
Thanks, that helps.