Ah.  To add a new row, call your grid dataprovider's addItem()
function, e.g. "myGrid.dataProvider.addItem( newUnit );".  I had
assumed that's what your ModelLocator.currentDeal.addUnit() function
was doing.  Check out the DataProvider class on livedocs for more info.

In fact, it wouldn't be a bad idea for addUnit(o) to call
dg.dataProvider.addItem(o.clone()) so you won't need to worry about
the whole object reference issue.

HTH,
Doug

--- In [email protected], "Jonathan Willis" <[EMAIL PROTECTED]> wrote:
>
> I must have deeper issues. Even creating a brand new instance of
> UnitVO, as you have below, I still get empty rows.
> 
> If I explicitly specify a dataProvider subordinate to the DataGrid tag
> it'll populate the grid but I still can't add new rows on the fly. All
> of the documentation and examples only show binding a dataProvider,
> not adding items dynamically so it's just no help.
> 
> --- In [email protected], "Doug Lowder" <douglowder@> wrote:
> >
> > That ought to have done it.  You can try the following to verify the
> > basics, and then check to see if your copy() and/or clone() functions
> > have a bug.
> > 
> > var newUnit:UnitVO = new UnitVO( );
> > newUnit.someProp = someValue;
> > ModelLocator.currentDeal.addUnit( newUnit );
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to