I'm calling a function to set the verticalScrollPosition in the
onResult function of my service call, and it's setting the scroll
position
However, and maybe this is a bug in verticalScrollPosition(?), the
DataGrid sets the scroll position (meaning that the scroll bar is in
the
K Everyone,
I got it to work by calling the rememberDGPosition() on the DG's
render event. So that worked for the scroll position and fixed
the above bug. I can only assume that my earlier solution was
setting the scroll position before the dataProvider registered an
update.
So, that was
I added a collectionChange event to my XMLListCollection (that's the
dataProvider for the grid) as follows:
public function preserveScrollPosition(event:CollectionEvent):void {
var prevIndex:int = this.dgDelays.verticalScrollPosition;
trace(prevIndex =
Im sorry, I totally misspoke. I
meant to say RESET in my explanation below.
When your collection is filled with new
data after a fill() call to your DataService, the component bound to that
collection will receive a CollectionEvent with kind = RESET. Internally, we
re-populate the
I'm still not having any luck. The reset event is being called
upstream and processed in my handler, with the proper value of
prevIndex calculated, but the grid still jumps to the top after the
data fill:
if (event.kind == CollectionEventKind.RESET) {
var prevIndex:int =
DJ,
Perhaps you could set the verticalScrollPosition on the grid's render event. I'm not sure if this would work, but it might be worth a try
-TH
private var updateGridVerticalScrollPosition:Boolean = false;private var gridVerticalScrollPosition:int = 0; // or use Number instead
"update" button
>From my experiences, the grid takes a beat to update its visual appearance when its data gets updated. After I know that the data has been updated, I normally use callLater() to set the scroll position.
On 6/28/06, djbrown_rotonews [EMAIL PROTECTED] wrote:
I'm still not having any luck. The
I actually tried this (my dataProvider for the grid is an
XMLListCollection being populated by a jsp. The grid has custom item
renderers if that's relevant).
anyhow, I have an update button which will call the jsp and get
new results when clicked. I've set it up so the click() method
When the actual data comes in, the DataGrid encounters a REFRESH
collectionChange event and if you look in
ListBase.collectionChangeHandler's REFRESH case, you'll see that the
verticalScrollPosition is set to 0.
What you need to do is set the scroll position *after* the data has come
in and the
9 matches
Mail list logo