There is a problem with the DataGrid control that I traced to
the ListBase class.
When the data in the dataProvider dispatches a collection
change event it causes an updateDisplayList to Occur.
in the block of code in ListBase.as from Line 2831 to 2848,
it first checks to see if the dataProvider has Items, which is
true, then it checks to see if we have a pending scroll position,
which is 0 because the collection change event causes the ListBase
to set the pending positions to 0. since
horizontalScrollPositionPending and verticalScrollPositionPending
are equal to 0. it sets the scroll bars position to 0 leaving the
view unchanged. This causes the scrollbars and the datagrid view to
I've created my own paging dataset that extends
ListCollectionView. This dataset holds a buffer of 5 pages of data
and queries more data via a Web Service. everytime I set the list
variable it dispatches a collection changed event.
also I've noticed there is alot of clean up logic inside of
the dataProvider setter in ListBase.as which does not get called
because I'm not setting a new dataProvider... just changing the
data in the list.
There may be other methods that I could try that will not
dispatch a collection changed event which would keep the pending
positions to NaN. I haven't explored those options yet, this
appeared to me to be a bug.
I was able to fix this by overriding the mx_internal function
reset() and not dispatching the Collection Change event in my
dataProvider... I'm not sure if this has introduced any other
problems as of yet...