MACROMEDIA FLEX-GETTING STARTED WITH FLEX User Manual Page 70

  • Download
  • Add to my manuals
  • Print
  • Page
    / 148
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 69
<customer><first>Jack</first>
<last>Herrington</last></customer>
<customer><first>Lori</first>
<last>Herrington</last></customer>
<customer><first>Megan</first>
<last>Herrington</last></customer>
</mx:XMLList>
<mx:DataGrid dataProvider="{customers}" editable="true">
<mx:columns>
<mx:DataGridColumn dataField="first" />
<mx:DataGridColumn dataField="last" />
</mx:columns>
</mx:DataGrid>
</mx:Application>
All
I needed to do was add the editable attribute to the Data
Grid and set it to true.
When I bring this up in the browser and double-click on a cell,
I see something similar to Figure 4-13.
Of course, to make the example functional I would need to
listen to the editing events and update the backend data store
to match.
By default, the DataGrid uses a text editor to edit the cell con-
tents, but you can provide your own editor renderer to use
whatever controls you like to edit the value in the cell.
Figure 4-12. The advanced data grid
54 | Chapter 4:Flex Controls and Layout
Page view 69
1 2 ... 65 66 67 68 69 70 71 72 73 74 75 ... 147 148

Comments to this Manuals

No comments