|
|
|
|
- Overview
- How to?
- Creating a Treeview control based on a data file
- "Populate sub-levels dynamically" option
- Manipulating a TreeView control based on a data file
TreeView control linked to a data file
You have the ability to create TreeView controls directly linked to the data. You can create a TreeView control based on a data file: the TreeView control will be linked to a data file or to a query. The programming of the TreeView controls is simplified: there is no need to use the TreeXXX functions directly. Creating a Treeview control based on a data file To create a TreeView control based on a data file: - Create a TreeView control (on the "Creation" tab, in the "Data" group, click "TreeView").
- Open the control description window (select "Description" in the context menu).
- In the "Content" tab, select "File/Query".
- Click "Add". A "<None>" source is automatically added.
- Define the characteristics of this source:
- Source: corresponds to the data file or query that will be looped through.
- Iterate: corresponds to the search key used to loop through the data source.
- Display: corresponds to the item displayed in the TreeView control.
- Add (if necessary) a second source for the next level ("Add" button). In this case, you have the ability to define the source of the link for the previous level.
For example, if the first level loops through the Customer data file, the second one can loop through the Orders data file. The items that will be used to set the relation are "Customer.CustomerID" and "Orders.CustomerID". By default, the source of the link is automatically deduced from the items and links defined in the analysis. - Define as many sources as necessary.
Special case: Recursive TreeView control based on a data file A TreeView control based on a data file can display records that depend on the previous record (standard case of a recursive link used to manage the parents and the children for example). To manipulate this type of TreeView control, you can define a reflexive link in the "Content" tab of the TreeView control description window. - Validate the TreeView control description window. The TreeView control is based on a data file.
Manipulating a TreeView control based on a data file You can easily manipulate TreeView controls based on a data file: - If the TreeView control can be edited, the changes made to the control are automatically reflected to the bound data source.
- If the TreeView control does not allow user input, the bound data source will not be modified.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|