<mx:ComboBox prompt="Select One"/>

-TH

--- In flexcoders@yahoogroups.com, "Mark" <[EMAIL PROTECTED]> wrote:
>
> Thanks for the quick reply Ralf, but I have no idea how to do either
of what you
> suggested. Would you know of any examples you can point me to?
>
> Thanks,
> Mark
>
> --- In flexcoders@yahoogroups.com, "Ralf Bokelberg" ralf.bokelberg@
wrote:
> >
> > You can provide your own sort function, which sorts your special
entry
> > at the top.
> > Alternatively you can use the prompt propertyof the combobox. It is
> > shown if the selectedIndex is set to -1
> > Cheers,
> > Ralf.
> >
> > On Sat, Nov 8, 2008 at 3:07 PM, Mark markp.shopping_id@ wrote:
> > > I'm trying to sort an arrayCollection that is the dataProvider for
a
> > > comboBox. But I also need to add an item to the top of the
> > > list "Select One". Everything I've tried always sorts that object
> > > as well. Is there a way to exclude something from a sort or am I
> > > just doing this completly wrong? Here's what I have?
> > >
> > > var sort:Sort = new Sort();
> > > sort.fields = [];
> > > sort.fields.push(new SortField("title",true));
> > > nameCollection.sort = sort;
> > > nameCollection.refresh();
> > > //
> > > // add new item to the top
> > > //
> > > var sItem:Object = new Object;
> > > sItem = {title:"Select One"};
> > > nameCollection.addItemAt(sItem,0);
> > > //nameCollection.refresh();
> > >
> > > Thank You,
> > > Mark
> > >
> > >
> >
>



Reply via email to