AnsweredAssumed Answered

Combobox not populating... data object of ItemFileReadStore not recieving values.

Question asked by v_dubey on Sep 17, 2013
Latest reply on Sep 17, 2013 by v_dubey
Hi all

I am having trouble in populating combobox while using ArcGIS API for Javascript v3.6.

The data object in ItemFileReadStore is not recieving the array of objects passed. My code is below.

dojo.require(""); dojo.require("dijit.form.ComboBox"); dojo.require("esri.tasks.query"); function selectData() {  alert("in selectData");     queryTask1 = new esri.tasks.QueryTask             (mapURL);     query1 = new esri.tasks.Query();    query1.returnGeometry = true;    query1.outFields = ["AC_Name"];    query1.where = "District= 'Nagpur' ";    queryTask1.execute(query1,populateList); }  //to fill AC_Name combobox function populateList(results) {   alert("in populateList");     //Populate the ComboBox with unique values     var values = [];     var testVals={};     //Add option to display all zoning types to the ComboBox     values.push({name:"ALL"})      //Loop through the QueryTask results and populate an array     //with the unique values      var features = results.features;     dojo.forEach (features, function(feature1) {         acName = feature1.attributes.AC_Name;       if (!testVals[acName]) {         testVals[acName] = true;         values.push({name:acName});       }     });     //Create a ItemFileReadStore and use it for the     //ComboBox's data source     var dataItems = {            identifier: 'name',            label: 'name',            items: values     };     var store = new{data:dataItems.items});     dijit.byId("mySelect").store = store;      }

I have used this same code in my other application built using ArcGIS API v2.6 and its working fine. But {data:dataItems.items} does not get any values in v3.6.
Any help is appreciated.