var data = arrayUtils.map(featureSet.features, function (entry, i) { return { NAME: entry.attributes.SITENAME, REGION: entry.attributes.REGION, WATERBODY: entry.attributes.WATERBODY, TYPE: entry.attributes.TYPE, ACCESSAREA: entry.attributes.ACCESSAREA, LOCATION: entry.attributes.LOCATION }; }); grid.store.setData(data); grid.refresh();
var newStore = new dojo.data.ItemFileReadStore({data: { identifier: "", items: []}}); var grid = dijit.byId("grid"); grid.setStore(newStore); }
Solved! Go to Solution.
Field 1 Field 2 Field 4 Field 5 Field 3
var data = array.map(results.features, function(feature) { return { "id": feature.attributes[outFields[0]], "NAME": feature.attributes[outFields[2]], "WATERBODY": feature.attributes[outFields[3]], "ACCESSAREA": feature.attributes[outFields[5]], "LOCATION": feature.attributes[outFields[9]] } });
outFields = ["OBJECTID", "SITENAME", "WATERBODY", "ACCESSAREA", "LOCATION"];
var data = array.map(results.features, function(feature) { return { "id": feature.attributes[outFields[0]], "SITENAME": feature.attributes[outFields[1]], "WATERBODY": feature.attributes[outFields[2]], "ACCESSAREA": feature.attributes[outFields[3]], "LOCATION": feature.attributes[outFields[4]] } });
var data = array.map(results.features, function(feature) { return { "id": feature.attributes["OBJECTID"], "SITENAME": feature.attributes["SITENAME"], "WATERBODY": feature.attributes["WATERBODY"], "ACCESSAREA": feature.attributes["ACCESSAREA"], "LOCATION": feature.attributes["LOCATION"] } });
gridNoColumnSets.set("columnSets", columnExample2);