Data Explorer sample

Clicking on each TreeView level displays details in a DataWindow on the right. For example, if you click a name in the TreeView DataWindow on the left, detailed customer data displays in the DataWindow on the right.

The sample shows employees as the top level node in the left pane. One employee’s node has been expanded to show the company name of her customers. The right pane shows details for each customer.

You can click on any TreeView level in the Data Explorer. If you click a company name in the TreeView DataWindow on the left (for example, Able Inc., under Catherine Pickett), order information displays on the right.

The right pane has changed to show sales order detail’s for the customer selected in the tree view in the left pane.

If you click an order ID in the TreeView DataWindow on the left (for example, order ID 2400, under Bilhome Industries, under Alison Clark), the customer order information displays on the right.

The customer node in the left pane has been expanded to show an order number, and the right pane shows details of each item in the order.

Data Explorer TreeView DataWindow

Here is the TreeView DataWindow used in the Data Explorer.

The design, preview, and properties view for the sample display in the datawindow painter.

NoteOne TreeView DataWindow The Data Explorer uses one TreeView DataWindow, but DataWindows that are not TreeView DataWindows also support the Data Explorer’s functionality.

Data Explorer code

The code in the Clicked event uses the ObjectAtPointer.Band property to determine which DataWindow to display. Clicking on some editable items in the detail DataWindow opens a window in which you can manipulate the data.

The PopMenu menu object has two menu items that call the CollapseAll and ExpandAll methods to collapse or expand all the nodes in the TreeView.