The question is probably better answered by how do I get value == displayedValue. Or how do I prevent value to be Index based and instead use the textstring I provide from my store.
My Json has this structure:
{"items":[{"zipcity":"Stocka"},{"zipcity":"Stockamöllan"},{"zipcity":"Stockaryd"}]}
Does it need to change?
Currently This is my filteringselect code:
postadressStore = new dojox.data.QueryReadStore({url: "LKP.json"}); postadressStore.fetch({serverQuery:{name:''}, queryOptions:{ignoreCase:true}});
new dijit.form.FilteringSelect({
store: postadressStore,
hasDownArrow: false,
autoComplete: false,
searchAttr: "zipcity",
style: "width: 290px;",
name:"postadress",
id: "postadress_id",
validate: function() { return true;}
},"postadress");
I tried this for changing the value but value is read-only?
var elm = dijit.byId("postadress_id"); var val = elm.attr('displayedValue'); elm.attr('value',val);