MACROMEDIA FLEX-GETTING STARTED WITH FLEX Manuale Utente Pagina 68

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 148
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la 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
Vedere la pagina 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 147 148

Commenti su questo manuale

Nessun commento