I am going off this example: Show find task results in a DataGrid | ArcGIS API for JavaScript
And this appears to be the block of code that I need to populate my grid with the exception of the rowclick handler:
//Create data store and bind to grid. store = new ItemFileReadStore({ data : data }); var grid = registry.byId("grid"); grid.setStore(store); grid.on("rowclick", onRowClickHandler);
I want to populate my address candidates that are found here:
if (addressCandidates.length > 1) { for (a = 0; a < addressCandidates.length; a++) { // This is the address that should go into a grid cell console.log(addressCandidates.address); } }
This code loops through to obtain each address candidate. I would like to bind the address candidate to the grid as I loop through the code. How do I do that?
Here is the complete code: