Salesforce

How Do I Display Data in a Tree-format? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I Display Data in a Tree-format? (Magic xpa 4.x)

The tree format is a convenient way to display lists of data. It has become popular in the Windows environment, and users are familiar with it.

Magic xpa has an easy-to-use Tree control that you can use as needed. All you have to do is store your data in a hierarchically designed table (a memory table will do fine) and set the options you want. Here are the basic steps.

Implementing a Tree control

  1. Store your data in the correct format for a tree. See How Do I Properly Define an Hierarchical Data Source that Will Fit a Tree Control Display?.

  2. Create the Data View of the task, using the Tree data source as the Main Source, and selecting the columns that you need for the task (Node, Parent, etc.).

  3. Select the Tree control from the Toolbox and drop it on the form. Size it as desired.

  4. In the Control Properties for the tree, set the following options:

    • Node ID: The key for this particular record.

    • Parent ID: The key for the parent of this record.

    • Root Value: The very top record (here named ‘ROOT’).

    • Description variable: The value that displays on the tree.

That is all you need to do. If the data is correctly formatted, it will display as a table. There are other options you can set too, to control the look of the table and how it works in runtime; these are covered in other sections of this How-To.

See also

The Online and Rich Client Samples projects (program TR01 and RTR01)

Reference
Attachment 
Attachment