the one I looked at here didn't have your method...
http://livedocs.macromedia.com/flex/15/asdocs_en/mx/controls/listclasses/DataProvider.html
but this documentation does...
http://livedocs.macromedia.com/flex/15/flex_docs_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flex_Documentation&file=00000210.htm
On 6/29/05, digital_eyezed <[EMAIL PROTECTED]> wrote:
Thanks,
Added this and it worked:
function addSelect(event){
var theTargetId = event.target;
theTargetId.addItemAt(0,"Please Select",0);
theTargetId.selectedIndex = 0;
}
Small typo in yours, its addItemAt not addItemsAt, took me a wee
while to notice it.
Best Regards,
Iain
--- In flexcoders@yahoogroups.com, Clint Modien <[EMAIL PROTECTED]> wrote:
> Should be
>
> function addSelect(event){
> var theTarget = event.target <http://event.target.id/ >;
> theTarget.addItemsAt(0,new Array([{label:"Please Select",data:0}]);
> }
>
> Or the easiest way would be to add the Item to the result when you
get it
> back
>
> event.result.push({label:"Please Select", data:0});
>
> the "label" and "data" properties of the object should coincide
with the
> properties of your VO
>
> if you can give me the definition of the VO maybe I can elaborate
>
> On 6/29/05, digital_eyezed <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > How do I have the first item in the combobox read 'please select'
> > with a corrosponding data value of 0(zero). The rest of the
combobox
> > should be filled with a return from a remote object call and the
> > resulting VO objects (with label / Data pairs).
> >
> > I can fill the comboBox with the VO's no problem, but How do I
add
> > the 'Please Select'?
> >
> > I have tried this function on the creationComplete event of the
> > Combobox:
> >
> > function addSelect(event){
> > var theTargetId = event.target.id <http://event.target.id>;
> > theTargetId.addItemAt(0,"Please Select",0);
> > }
> >
> > any help most appreciated.
> >
> > Regards,
> >
> > Iain
> >
> >
> >
> >
> > --
> > 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
> >
> >
> >
> >
> >
> >
> >
--
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/
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
---- LSpots keywords ?> ---- HM ADS ?>
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.