[Dojo-interest] how to programmatically create and add/remove options from a dropdown widget ?

Yoav Rubin yoavrubin at yahoo.com
Thu Dec 21 23:53:48 MST 2006


Hi, if I understood you correctly, I had the same problem, and what I did was handling the data in the dropdown's content provider :
dojo.widget.byId('myDropDownId').dataProvider.setData()...
the setData function receives an array of pairs (each element is a [key,value] ). I have also my array which to it I remove/ add / edit entries and after doing so i call to the set data function with my updated array.
HTH

Yoav

----- Original Message ----
From: Luc Giavelli <luc at knownow.com>
To: dojo-interest at dojotoolkit.org
Sent: Thursday, December 21, 2006 8:06:28 PM
Subject: [Dojo-interest] how to programmatically create and add/remove options from a dropdown widget ?




 
 

<!--

 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
text-decoration:underline;}
span.EmailStyle17
	{
font-family:Arial;
color:windowtext;}
 _filtered {
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{}
-->






Hello
 

  
 

The examples, even the programmatic one, use markup in the
template to initialise the list, and I don’t see an easy way to modify it.
 

  
 

Thanks
 

  
 

Lucho
 




_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
Dojo-interest at dojotoolkit.org
http://dojotoolkit.org/mailman/listinfo/dojo-interest






__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20061221/99384195/attachment.html


More information about the Dojo-interest mailing list