Thanks guys, I suspected that's how it worked - makes a lot of sense. It'd be cool if DataGrid had a creationPolicy property like other components do. Then you could adjust this behavior if you wanted to. BTW, nice site, Ben!!
_____ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Tuesday, December 19, 2006 8:40 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How do I reset itemRenderer inside DataGrid when dataProvider is updated? Yep. Tom, Lach is correct, and here is an explanation with a bit more detail. If your DataGrid's dataProvider has 100 items, but it is only big enough to display 10 at any given time, the DataGrid only actually draws 10 items, in order to maximize performance. When you scroll the DataGrid there aren't any new items being drawn, it is simply swapping the data properties between the already drawn items. So scrolling down one row means that the piece of data for the second item is switched to be the data for the first item, the second item receives the third item's data, and so on and so on. I've written a couple of articles on my site about itemRenderers and some key concepts around them in case you're interested. HTH, Ben http://www.returnun <http://www.returnundefined.com/> defined.com/ --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> ups.com, Lachlan Cotter <[EMAIL PROTECTED]> wrote: > > Sorry if this is out of left field (and wrong), as I haven't read > through the rest of the thread, but is it the case that dataChange is > fired during scrolling because the item renderers are reused by the > list control with different items in the dataProvider? > > Cheers, > Lach > > > On 19/12/2006, at 11:08 AM, Tom Lee wrote: > > > as is so often the case, we have no answer to the question at hand > > (why does a dataChange event fire when the datagrid is scrolled?) >