Hi Jordan –

 

You can keep track of the verticalScrollPosition property in your DataGrid and upon receving UPDATES, re-set the verticalScrollPosition to the previous value and the DataGrid will jump to the last scroll position and show the correct content.

 

-deepa

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Jordan Snyder
Sent: Monday, June 26, 2006 7:34 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Keeping DataGrid from scrolling to top on update to dataProvider

 

Hello All,

I am working on an app in which I poll the server quite frequently to get new information.  The information comes to me in an XML format that I simply assign as the dataProvider for a DataGrid component.

I have to keep in consideration the fact that the user may have selected a certain row, and may want to delete that row even after an update to the dataProvider is made, so I keep track of the selectedIndex property and reselect upon an update.

But if the user has not selected a row, the DataGrid will automatically scroll to the top upon an update, even if the user has scrolled to the bottom of the grid. 

Is there a way around this?  I found a way to scrollToIndex(), but no way of getting the currently viewed items.  It may have something to do with the various renderer properties available on the DataGrid, but I have a very limited understanding of this, so it's over my head.

Surely this problem has been run into before, but I can't seem to find the right combination of search terms to figure out a method of solving it.

Does anyone have any ideas or proven methods for the problem?  Any help would be greatly appreciated.

Thank you,

Jordan Snyder
[EMAIL PROTECTED]
www.jordansnyder.com

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to