4 Replies Latest reply on Nov 8, 2010 11:10 AM by Flex harUI

    datagrid resets to row 1 after dataprovider content is changed

    mumcs01 Level 1

      I"m hoping someone can point me in the right direction on this. I have a datagrid with about 100 rows. Each time the user selects a row or seveal rows and pushes a button I sent out an XML string to an HTTPservice. Using a token handler, after the HTTPservice is received by the server, and response is sent to the application with upgrades to the arraycollection that is the data provider to the datagrid. All binding happy, and all of this works really well. The problem is, since the amount of data exceeds a screensize, the datagrid has scrollbars. About 20 or so rows fit without scrolling. Now if the user scrolls down and selects say rows 40-45, and pressses the button, the http transaction works, and I get the right responses, but I notice that when I incorporate the changes into the array collection the datagrid refreshes, but resets the position to the top of the table. This is not user friendly. How do I stop or work around this? I need to support scrolling, but i do not want the datagrid position to change. ie... I did some searching, and in my instance there is no risk that I will go from 100 rows to say more or less rows after an http call. This return value is really only to get some updated info to go into existing rows. (Number of rows remains unchanged, only the data in them).


      Any help on what to look into would be great!