DataGrid

The UIDUtil class is a utility class for manipulating UIDs (universal identifiers) in Flex. A UID is a very unique String which is hopefully fully unique. The UID is intended to be a unique index to a particular instance of a class in Flex. The UIDUtil class has static methods that can create and fetch UIDs for any Object in a Flash application. UIDUtil is commonly used by the list classes to index their contents and provide lookups for various purposes.

Problem:

You have a DataGrid which is highlighting the wrong row when you navigate using the mouse or keyboard.

Solution:

It is likely that you have put duplicate data in the dataProvider for your DataGrid. It is illegal to put the same instance into the collection of data that you assign to the dataProvider property. You can create duplicate objects, but they must be different instances of the same object. It is valid if the fields are identical, but not the objects themselves.

The only solution to this is to create unique objects for your DataGrid.

Further explanation, along with a SWF example and source code:

Problem

You need to have a DataGrid which needs to show a roll over highlight but is not selectable.

Solution

Set selectable to true and override public function isItemSelectable(data:Object) in DataGrid and return false.

List classes are rooted in the ListBase class and include DataGrid and ListBase.

Problem

I am seeing some runtime errors (RTEs) with the data or listData properties when I use my DataGrid or AdvancedDataGrid with a custom item renderer.

Solution

Verify that your code always preserves the value that the grid sets data and listData to in your setter.

The DataGrid class is a very flexible and commonly used class that displays a set of data in a grid. This data is structured into rows and columns and the data can be edited.

DataGrid is a subclass of DataGridBase which extends ListBase. DataGridBase provides some of the default implementation of the DataGrid, but there are no other subclasses of DataGridBase.

More to come...

The ListBase class is the base class for all of the list classes in Flex which are:

List classes share a common interface through the dataProvider properties and they dispatch similar events.

More to come...

Search Great Flex/Flash Sites