docs.intersystems.com
MultiValue Quick Start Tutorial
Adding a Table Pane
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Search:    

Zen provides the tablePane component for displaying a table of data. The tablePane can retrieve data from Caché in a number of different ways. For this example, we configure the component to automatically generate an SQL query to retrieve the data. This requires that we do the following:

Using Caché studio, add the following tablePane component to MVFILE.PersonPage.cls. Note that it must be placed between the opening and closing <page></page> tags within the XData Contents block.
<page xmlns="http://www.intersystems.com/zen" title="Zen Persons">
  <tablePane
    align="center"
    width="900px"
    id="personTable" 
    tableName="MVFILE.PERSON"
    maxRows="1000" 
    pageSize="10" 
    showRowNumbers="true" 
    showZebra="true" 
    useSnapshot="true"
    caption="PERSON"
    nowrap="false"
    onselectrow ="zenPage.displayForm(zenThis);"
    valueColumn="ID"
 >
   <column colName="ID" width="20" />
   <column header="ItemId" colName="ItemId" width="50" />
   <column header="Name" width="175"  colName="Name" filterType="text"/>
   <column header="Hair" width="100" colName="Hair"/>
   <column header="Age" width="30"  colName="Age"/>
   <column header="Phone" width="100" colName="Phone"/>
 </tablePane> 
</page>
        
Note the following about the tablePane definition:
Note:
For more information on the tablePane component, read Zen Tables in Using Zen Components.
For a more in depth example of displaying data with the tablePane component, read Part II: Displaying Data with a Table in the Zen QuickStart Tutorial.


Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA