Select to view content in your preferred language

How do I bind my address candidates to a data grid?

1994
0
07-31-2015 06:50 AM
ChrisSergent
Deactivated User

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:

JS Bin - Collaborative JavaScript Debugging

Tags (2)
0 Kudos
0 Replies