The Spark DataGrid control
displays a row of column headings above a scrollable grid. The grid
consists of a collection of individual cells arranged in rows and columns.
The DataGrid control is designed to support smooth scrolling through a
large number of rows and columns.
The Spark DataGrid control is implemented as a skinnable wrapper
around the Spark Grid control.
The Grid control defines the columns of the data grid, and much
of the functionality of the DataGrid control itself.
The DataGrid skin is responsible for laying out the grid, the
column headers, and the scroller. The skin also configures the graphic
elements used to render visual elements used as indicators, separators,
and backgrounds. The DataGrid skin defines a default item renderer
used to display the contents of each cell.
Note: Because the DataGrid control is implemented as a wrapper
on the Grid control, they share much of the same functionality.
Therefore, many of the examples below are for the DataGrid control,
but can be easily modified to apply to the Grid control.
The Spark DataGrid control provides the following features:
Interactive column width resizing
Control of column visibility
Cell and row selection
Single item and multiple item selection modes
Customizable column headers
Cell editing
Column sorting
Custom item renderers and item editors
Custom skins to control all aspects of the appearance of
the DataGrid control
Adobe Product Evangelist James Ward provides an overview
of the Spark DataGrid control in the video Overview of Spark DataGrid in Flex.
Adobe Senior Computer Scientist Alex Harui creates
a custom skin for the Spark DataGrid control in Spark DataGrid Footers, and shares
his sample code for the Spark DataGrid with HierarchicalCollection
and GroupingCollection.
Browse Flex Cookbook entries for the Spark
DataGrid for new sample applications for the Spark DataGrid
control.