Frustrating Flex problems solved #3 – DataGrid scrolling error

I’m currently working on a project that requires me to be using Flex 2 rather than Flex 3(I’m using an older version of Zinc, and avoiding upgrading if possible as we’ll probably be moving to AIR after this project). But – issues in Flex 2 are no longer supported…

The problem i encountered was when changing the DataGridColumns and dataProvider of a DataGrid, it gave a #1010 error ‘A term is undefined and has no properties.’ when scrolling vertically.

After trawling the web for answers, I found a diamond here from Marc Sulinski, who suggested the hack of extending the DataGrid class and overriding updateDisplayList with the following:

override protected function updateDisplayList(w:Number, h:Number):void {
var b:Boolean = false;

if( rendererChanged ) b = true;

super.updateDisplayList(w, h);
if( b ) {
while( rowInfo.length > listItems.length ) rowInfo.pop();

iOS development with Swift - book: video course:

Tagged with:
Posted in Flex

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: