invalidateList() and updateList() should also refresh the DG>

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Dominic Pazula
Sent: Monday, February 11, 2008 6:31 PM
To: [email protected]
Subject: [flexcoders] Re: How can I FORCE a REDRAW of a DATAGRID

 

Oh, I know. He seemed to want a way to do it no matter what. This 
seems a likely way to get his new data into the grid, no matter 
what...

I'm still learning Flex myself and the "itemUpdated()" is going into 
my ever expanding bag of tricks. Thanks!

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Yes that always works, re-assigning the dataProvider, but it does
> refresh the entire DG, which is usually not necessary unless the 
entire
> dataprovider is replaced.
> 
> 
> 
> The OP has not told us how he is updating the dataProvider, nor 
what the
> ArrayCollection contains. If one uses the the dataProvider API (on 
a
> collection or xml) the UI updates automatically.
> 
> 
> 
> If one manually updates a property in an item object, then often one
> needs to call itemUpdated()
> 
> 
> 
> Tracy
> 
> 
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>

[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of Dominic Pazula
> Sent: Monday, February 11, 2008 5:15 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Re: How can I FORCE a REDRAW of a DATAGRID
> 
> 
> 
> Try setting a new ArrayCollection with all the values from the 
> changed ArrayCollection. Null the DataGrid dataProvider and then 
set 
> the dataProvider to the new ArrayCollection. 
> 
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com>  <mailto:flexcoders%
40yahoogroups.com>
> , "mr_j_harris" <mr_j_harris@> 
> wrote:
> >
> > 
> > Hi Sharif, and thanks, I tried that, it provides the same results 
as
> > I'm used to, which is a 95% refreshment of the on-screen visual 
> aspect
> > of the DataGrid. 
> > 
> > Does it force a redraw of all updated cells on my DataGrid... 
answer
> > is NO.
> > 
> > Do I need a redraw of all updated cells on my DataGrid... answer 
is 
> YES.
> > 
> > Many other poor sods (i.e. Flex Coders) have this problem.
> > 
> > I digress, but Look: if Adobe was actually so clever, wouldn't 
they
> > already have parsed all stylesheet names in any .css file in the
> > project to provide to the Content Assistant? 
> > 
> > Oh I get it, perhaps it's called the "Metered Release of 
Features" 
> to
> > make money for the company Adobe.
> > 
> > 
> > I just need to be able to FORCE a REDRAW of my DataGrid content.
> > 
> > rendererChanged = true? Can't access that supposed property.
> > 
> > But that would probably do it.
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > However, it seems I need a 100% refreshment of all modified cells 
on
> > the grid, and this is not happening for me via any on 
> > 
> > datagrid.validateNow()
> > DataProviderArrayCollection.refresh() 
> > datagrid.invalidateList()
> > datagrid.invalidateDisplayList()
> > 
> > 
> > 
> > 
> > 
> > 
> > --- In [email protected]
<mailto:flexcoders%40yahoogroups.com> 
> <mailto:flexcoders%40yahoogroups.com> , Sherif Abdou <sherif626@> 
wrote:
> > >
> > > what do you mean by redraw? you can try validateNow() on the 
Grid
> > > 
> > > 
> > > ----- Original Message ----
> > > From: mr_j_harris <mr_j_harris@>
> > > To: [email protected]
<mailto:flexcoders%40yahoogroups.com>  <mailto:flexcoders%
40yahoogroups.com>
> 
> > > Sent: Monday, February 11, 2008 2:33:47 PM
> > > Subject: [flexcoders] How can I FORCE a REDRAW of a DATAGRID
> > > 
> > > 
> > > 
> > > I need to force a redraw of a datagrid.
> > > 
> > > Adobe's or whoever's Cleverness is not working for me.
> > > 
> > > I just want to have my computer redraw the DataGrid from 0,0 to 
> the
> > > bottom right corner. My computer has nothing better to do than 
> that
> > > for me or my users. Because elsewise it is show stale data.. 
See, 
> I
> > > recomputer some values in thoe objects in the ArrayCollection
> > > dataProvider of the dataGrid.
> > > 
> > > Please tell me the one, two or three lines of ActionScript that 
> will
> > > do this.
> > > 
> > > Oh yeah, without causing that TypeError #1009 thing ever.
> > > 
> > > Alternatively, how can I force a redraw of a particular cell? I 
> know
> > > the cell coordinates. ...
> > > 
> > > -- John Harris
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > 
> __________________________________________________________
> ______________
> > > Be a better friend, newshound, and 
> > > know-it-all with Yahoo! Mobile. Try it now. 
> > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
<http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ> 
> <http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
<http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ> > 
> > >
> >
>

 

Reply via email to