you would have to create a new object entirely.  So, create a new
'row' for your dataprovider based  off member data in your
slectedItem, tehn push this new 'row'.

Something like
var row : Object = new Object();
row.col1 = selectedItem.col1;
row.col2 = selectedItem.col2;

ModelLocator.creditItemList.push(row);

somehting like that should do it

DK.

On 12/12/05, jamiebadman <[EMAIL PROTECTED]> wrote:
> Thanks - that would explain the strange behaviour... maybe!
>
> How can I 'push' a copy rather than a reference ? Is there an easy
> way to do this ?
>
> Thanks,
>
> Jamie.
>
> --- In [email protected], Douglas Knudsen
> <[EMAIL PROTECTED]> wrote:
> >
> > I may be off here, but isn't
> >  ModelLocator.creditItemList.push(ModelLocator.creditItemList
> > [dgItems.selectedIndex]);
> > pushing a reference to your selected item on the the dataProvider?
> > That would mean both your original selectedItem and this new 'copy'
> > would be selected.
> >
> > DK
> >
> > On 12/12/05, jamiebadman <[EMAIL PROTECTED]> wrote:
> > > I wonder if anyone can help with the following... I'm getting
> some
> > > weird results...
> > >
> > > Here's the basic idea:
> > >
> > > I have an array which is used as a data provider for a grid.
> > >
> > > I have a 'copy' button which calls a function that amongst other
> > > things, does this:
> > >
> > >  ModelLocator.creditItemList.push(ModelLocator.creditItemList
> > > [dgItems.selectedIndex]);
> > >
> > > (ModelLocator.creditItemList is the array, dgItems is the
> datagrid
> > > using the array as its data provider).
> > >
> > > Then I do an executeBindings and a draw so everything on the grid
> > > looks fine...
> > >
> > > But then I find that if I select a row on the grid and drag the
> > > mouse downwards, it 'selects' the copied row as well - in fact
> the
> > > grid 'selected row' seems to be totally confused.
> > >
> > > Does anyone have any thoughts on how I can resolve this ?
> > >
> > > Thanks,
> > >
> > > Jamie.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Douglas Knudsen
> > http://www.cubicleman.com
> > this is my signature, like it?
> >
>
>
>
>
>
>
>
> --
> 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
>
>
>
>
>
>
>


--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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