[flexcoders] Arrays, Pushing and DataProviders...

2005-12-12 Thread jamiebadman
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.






 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/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/
 




Re: [flexcoders] Arrays, Pushing and DataProviders...

2005-12-12 Thread Douglas Knudsen
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?


 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/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/