You will have to add conditional logic to use the rowCount and index to
calculate the scroll position.

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Mark
Sent: Friday, October 17, 2008 4:07 PM
To: [email protected]
Subject: [flexcoders] datagrid scrolling problem

 

I have a basic datagrid that is getting the data from an 
arrayCollection with each item having a startDate field, among 
others. My boss wanted me to have the datagrid scroll down to the 
item that has the same start date as todays date. Basically I'm just 
looping thru the arrayCollection to find it and scroll down to it 
using:

myDG.verticalScrollPosition = array[i];

This works fine unless that item is at the end of the datagrid. Then 
it adds rows to the DG so that item is at top. What would be the 
proper way to do this so if it's the last item, it just scrolls to the 
bottom without adding more rows?

Thanks,
Mark

 

Reply via email to