Changing the DataProvider is expensive.  You should only do it if the
entire data set is in-fact changing (new query or something).  Otherwise
it is better to modify a single dataprovider.  Then, if there multiple
rows in the dataprovider, you can scroll using verticalScrollPosition.
 
The DG only scrolls by row.  If you need pixel-level scrolling, I have
suggested that you put the DG in a Canvas and scroll the DG in the
canvas.  Not sure if anyone has made this work yet.
 
-Alex

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of arpan srivastava
Sent: Monday, December 11, 2006 5:52 AM
To: Flex Components
Subject: [flexcomponents] how I can scroll the datagrid automatically ?



Hi all,
          I have to create a datagrid  with one row and row will scroll
automatically and display data one by one,  that is like a ticker. now i
what i did is created a timer in which i am changing the datatprovider
after certain time interval :

private function timerEvent(event:TimerEvent):void{
            if(dataCount < dataProvider.length){
                dG.dataProvider = dataProvider[dataCount++];
            }else{
                dataCount = 0;
            }
            dGinvalidateDisplayList();
}

it's working fine, but i need to smooth scrolling. is there anyway I can
scroll the datagrid automatically. Is there any other way I can do this
? 


________________________________

Access over 1 million songs - Yahoo! Music Unlimited.
<http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yah
oo.com/unlimited/>  

 

Reply via email to