O'Reilly logo

Flash® Builder™ 4 and Flex® 4 Bible by David Gassner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 19. Using List Controls

IN THIS CHAPTER

  • 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required