Thanks Tracy, I tried calling itemUpdated(objectOfConcern) often
(well, twice, actually) and it does not help.
Some other approaches, including the wholesale nullification and
reinstantiation of the data grid dataProvider caused me my famous
TypeError#1009
captureItemPosition: set myeditedItemPosition r/c=1,7
TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at
mx.controls::DataGrid/itemEditorItemEditBeginHandler()[C:\dev\flex_201_gmc\sdk\frameworks\mx\controls\DataGrid.as:4741]
My dataProvider is an ArrayCollection, each item is the same format, a
n Object with a few variables and an XML store for an array of values
as an object member.
Using an XML store allows my to dynamically specify a data item source
(just a number) in the itemRenderer get/set stuff.
After a cell edit I want to add up all the items on that row
and display that at the end - a Totals column. That part works.
Also I want to add up the columns of a 'parent child' relationship
(i.e the editied row is one of possibly several child rows of a
certyain 'parent' row. All the 'children' column values should be
accumulated to that same column cell in the parent row- a category
total, if you like. That INTERNAL MATH does happen, but the updated
cell does not display.
I just want to have that stupid grid redisplay everything in sight.
How to do that?
I'm stupid, it's stupid, but we're not getting along.
I can get my computed cells to display if I persist (save) the
ArrayCollection to my server store (a HTTP post of the equivalent XML
to a database record) , pick some other dataset into the grid, then
pick back my ArrayCollection that I stored : then the new value shows
up. A little late, I might add.
callLaterDispatcher()... how much later: a little bit later or a lot
later??
I am totally not enjoying my Flex experience. I think I might be in
good company there.
For what it's worth, it's Cairngorm. That is not at all relevant.
What it is, is the 'data binding' scheme coming up short of the
required functionality.
Sooner or later I'm going to get myself banned from this group because
of my negativity about this stuff.
signed,
Mr. John Harris
--- In [email protected], "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:[EMAIL PROTECTED] On
> Behalf Of Dominic Pazula
> Sent: Monday, February 11, 2008 5:15 PM
> To: [email protected]
> 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>
> , "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> , 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>
>
> > > 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>
> > >
> >
>