Hi Alex and Josh
Thanks for your help.
Worked perfectly for me. I was just little lazy to look for some in-built
property like selectALL in Flex for that, but your logic works perfect for
me.
Thanks again guys
Anuj
On Thu, Nov 20, 2008 at 2:55 PM, Josh McDonald <[EMAIL PROTECTED]> wrote:
> Code
sday, November 20, 2008 2:56 PM
> *To:* flexcoders@yahoogroups.com
> *Subject:* Re: [flexcoders] How to SelectAll entries in List
>
>
>
> Code:
>
> var all : Array;
>
> if (myList.dataProvider is Array)
> {
> all = myList.dataProvider.concat();
> }
> else
&g
oders@yahoogroups.com
Subject: Re: [flexcoders] How to SelectAll entries in List
Code:
var all : Array;
if (myList.dataProvider is Array)
{
all = myList.dataProvider.concat();
}
else
{
all = [];
for (var o : * in myList.dataProvider)
{
all.push(o);
}
}
myList.selectedItems = all;
Note
Of Josh
McDonald
Sent: Thursday, November 20, 2008 2:56 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How to SelectAll entries in List
Code:
var all : Array;
if (myList.dataProvider is Array)
{
all = myList.dataProvider.concat();
}
else
{
all = [];
for (var
Code:
var all : Array;
if (myList.dataProvider is Array)
{
all = myList.dataProvider.concat();
}
else
{
all = [];
for (var o : * in myList.dataProvider)
{
all.push(o);
}
}
myList.selectedItems = all;
Note that you might want to use myList.dataProvider.source() if it's a
collection
5 matches
Mail list logo