MACROMEDIA FLEX-GETTING STARTED WITH FLEX Manual de usuario Pagina 68

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 148
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 67
...
</mx:XMLList>
<mx:DataGrid width="100%" height="100%" dataProvider=
"{employees}">
<mx:columns>
<mx:DataGridColumn dataField="name" headerText="Name"/>
<mx:DataGridColumn dataField="phone" headerText="Phone"/>
<mx:DataGridColumn dataField="email" headerText="Email"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
When I run this in Flex Builder I see Figure 4-11.
You don’t even have to define the columns in the DataGrid un-
less you want to. The DataGrid control is smart enough to de-
tect the columns from the data and set itself up if you haven’t
defined the columns.
The AdvancedDataGrid is just like the DataGrid but with a more
powerful set of features. For example, it has the ability to roll
up sections of the data and provide users with spinners so that
they can drill down into the data.
Example 4-12 shows AdvancedDataGrid in action.
Figure 4-11. A simple data grid
52 | Chapter 4:Flex Controls and Layout
Vista de pagina 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 147 148

Comentarios a estos manuales

Sin comentarios