To clear selection from a list, set selectedIndex = -1

Setting selectedDate = null worked for me.

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen 
More
Sent: Tuesday, December 09, 2008 12:00 PM
To: [email protected]
Subject: Re: [flexcoders] clearing out mx:DateField


On Tue, Dec 9, 2008 at 2:44 PM, Ryan Graham <Ryan.> wrote:
>>> effective.selectedDate = null;
> This should clear it. Perhaps the actionscript function containing this
> code isn't getting called.

Sort of.

My flex also has a mx:List with a dataProvider.

I try to clear the List with:
myitems.selectedItems = null;

This is actually clearing the List, but every line of code after this
not executing.

So I guess the real question is what is the right way to clear a mx:List ?

> From: [email protected]<mailto:flexcoders%40yahoogroups.com> 
> [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On
> Behalf Of Stephen More
> Sent: Tuesday, December 09, 2008 12:18 PM
> To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> Subject: [flexcoders] clearing out mx:DateField
>
>
>
> Within flex I have:
> <mx:DateField id="effective" />
>
> Once a user selects a date, I can not clear it out using actionscript.
>
> I have tried:
> effective.selectedDate = null;
> effective.selectedDate = undefined;
> neither one has worked.
>
> How can one clear out the mx:DateField ?
>
> -Thanks
>
> This message is private and confidential. If you have received it in error,
> please notify the sender and remove it from your system.
>

Reply via email to