Tuesday, 15 February 2011

combobox - Set Default Value to a Combo box, when data is taken from a Store -


In Dojo, I want to set the first / top option by default in the Store / Display Options / Combo box text. I did not get any help if the document went through, please share your opinion if anyone has done this.

Ps - I could not use the id or option name to set it. I want to demonstrate whether item items have to be displayed for the first time to display something.

Thanks in advance

And it looks like my combo box

  var Selectbox = new dijit.form.ComboBox ({id: "box1 ", Disabled: true, uppercase: true, autocomplete: false, trim: right, value:" boxwit ", store: extensiondata store, style:" width: 120px; color: black; "}) Place (Top Resources Found 10.containerNode); There is no magic asset to set up the ComboBox default selection from the store, you have to set it manually.  

Something like this:

  box.set ('value', store.data [0] .value)   

See:

No comments:

Post a Comment