Active Query Builder support area

Working without the Design Pane (WinForms version 2.x)

Last modified:

This mode was made to meet the customer's needs to hide the Design Pane and be able to add fields to the Query Columns Grid directly from the Database Schema Tree. This mode allows for an easier query-building process for relatively small databases in which the relations between database objects are clear enough so that they won't need the query diagram.
To cope with this task, we had to teach the component to join objects in the query automatically, even if they aren't joined directly with each other. Suppose that the user builds a query for the well-known Northwind demo database in this mode, and he/she has added some fields from the Orders and the Products tables to the query wishing to get the list of orders that contain a particular product. The Orders and Products aren't joined directly, but there is a many-to-many relationship through the "Order Details" table. Our task was to detect such relationships and to add the necessary intermediate objects automatically to get the correct query in the result. And we had to implement a reverse scenario, in which the unneeded intermediate tables will be removed in case the ending objects are removed from the query.
To allow this, we've added the new properties to the component. The QueryBuilder.BehaviorOptions.AddLikedObjects property instructs to add the necessary intermediate objects automatically, while the QueryBuilder.BehaviorOptions.DeleteUnusedObjects property instructs to remove them.
To hide the Design Pane, set the QueryBuilder.PanesConfigurationOptions.DesignPaneVisible property to False. To show fields in the Database Schema Tree, set the QueryBuilder.MetadataStructureOptions.ShowFields property to True.

Is this article helpful for you?