all groups > macromedia flash flash remoting > april 2006 >
You're in the

macromedia flash flash remoting

group:

possible to make a *copy* of a RecordSet


possible to make a *copy* of a RecordSet sneakyimp
4/13/2006 1:29:50 AM
macromedia flash flash remoting:
i have a SWF that remotes a fairly large RecordSet (~1800 records). It's a
list of products and some info about them.

I'm writing some code to let a store administrator associate products with
each other ( so the site says "These other Companion Prodcuts might interest
you"). I therefore have to list one record set of 1800 products simultaneously
in two different data grids. the first to list the products and load the
'Companion Products' list. the other to let the admin choose which products to
associate.

Is it possible to COPY a dataset returned from a remoting call? I have my app
working right now but each instance of the productListDataGrid that I have on
my flash movie calls the list from the server independently. I was thinking it
would be more efficient to call the list once and split it into two copies--one
for each dataGrid. Can this be done?


Re: possible to make a *copy* of a RecordSet jag57
4/23/2006 6:16:37 PM
All you have to do is something like this:

var myRS:RecordSet = myService.getData();
myDataGrid.dataProvider = myRS;
myOtherDataGrid.dataProvider = myRS;

You can put those lines in a function and call it once.

I hope this helps.
Re: possible to make a *copy* of a RecordSet sneakyimp
4/26/2006 6:17:36 PM
Re: possible to make a *copy* of a RecordSet jag57
4/26/2006 8:06:23 PM
Then couldn't you do:

var myRS:RecordSet = myService.getData();
var myRSCopy:RecordSet = myRS;
dg.dataProvider = myRS;
otherDG.dataProvider = myRSCopy;

Then you can sort each RecordSet individually. I hope I'm understanding you
correctly. Tell me if you still need help.
Re: possible to make a *copy* of a RecordSet turbidity
12/4/2006 1:52:04 AM
AddThis Social Bookmark Button