I think Alex called "invalidateDisplayList" a "big hammer".
The best solution to this is to never use Array, or XMLList for dynamic dataProviders, since their methods do not dispatch the necessary events to update the UI. Instead, wrap Array in ArrayCollection, and CMLList in XMLListCollection, or use XML directly. Tracy ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of beecee1977 Sent: Tuesday, May 29, 2007 6:51 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Datagrid with bound dataProvider not updating. Call refresh() on what? The dataGrid doesn't have a refresh() method. It is an Array rather than an ArrayCollection. Could that be the problem? This could require a lot of refactoring! Scratch all that... myDatagrid.invalidateDisplayList() did the trick! Thanks! --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Angus Johnson" <[EMAIL PROTECTED]> wrote: > > arrayCollection or array? Try calling refresh() after the change. > > > On 29/05/07, beecee1977 <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I have a datagrid with the dataProvider bound to an array of objects. > > > > If I remove one of the items from the array the datagrid doesn't update > > to reflect this. Debugging and looking at the dataProvider's length it > > has updated, but that's not what's displayed. > > > > I've tried using validateNow() but that doesn't work. If I click on one > > of the column headers it updates. Currently I'm having to explicitly > > set the dataProvider in code, but then I lose the binding. > > > > Any suggestions? > > > > Thanks > > Bill > > > > > > >