Chapter 19. Using List Controls


  • Understanding list controls

  • Providing data to list controls

  • Using dynamic data providers

  • Controlling list item labels

  • Using list control events and properties

  • Handling user data selections

  • Using custom item renderers

Most Flex applications are designed for the purpose of presenting and managing data in some form. As a result, one of the most popular families of visual controls in the Flex framework includes those known as list controls.

A list control is defined as a component that has a dataProvider property that enables you to populate the control with dynamic data. The data provided to a list control can be in the form of either hierarchical or relational data, and the type of data you want to present frequently determines which control you use. In addition to being able to display relational or hierarchical data, list controls have a common set of properties, methods, and events that enable the user to select one or more items with mouse and keyboard gestures.

The Flex 4 SDK includes both the older MX list controls such as DataGrid, AdvancedDataGrid, and OlapDataGrid and newer controls based on the new Spark component architecture:

  • The List component. This component behaves by default like an HTML <select> control and displays data items to the user in a list box. After you learn how to use the List control, you have most of the information you need to use other such controls. You can populate controls with data, listen for events indicating ...

Get Flash® Builder™ 4 and Flex® 4 Bible now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.