<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Populate a grid once edits have been applied in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-a-grid-once-edits-have-been-applied/m-p/616399#M57602</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought I'd combed through all instances of app.bufferLayer_c and added in app.buffer_p.&amp;nbsp; Obviously not.&amp;nbsp;&amp;nbsp; I was making this much too complicated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Dec 2015 19:12:37 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2015-12-17T19:12:37Z</dc:date>
    <item>
      <title>Populate a grid once edits have been applied</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-a-grid-once-edits-have-been-applied/m-p/616397#M57600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this project the user can enable a buffer tool.&amp;nbsp; When the select a city, it selects the counties within a buffer distance, summarizes the populations of those counties and adds these as attributes to a circle I'm adding as a graphic in my buffer layer.&amp;nbsp; It's sort of like &lt;A href="https://developers.arcgis.com/javascript/jssamples/query_buffer.html" title="https://developers.arcgis.com/javascript/jssamples/query_buffer.html"&gt;Select with Feature Layer | ArcGIS API for JavaScript&lt;/A&gt; , except the information is stored in my featureService, so the user can keep the summaries they generate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two different years of data.&amp;nbsp; To manage this, I have two different layers in my featureService, one for current and one for projected.&amp;nbsp;&amp;nbsp; In my footer, I have two different grids that represent the summary values for each of the two layers.&amp;nbsp; I have a tab container with content panes for my grids.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tested all this out, I only had one layer.&amp;nbsp; Now that I've introduced the 2nd, its grid is not populating.&amp;nbsp; I can look at the featureService and see there are graphics getting added to the 2nd layer.&amp;nbsp; However the function I have for populating the grid never fires.&amp;nbsp; The grid itself seems to be getting created, it's just empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some event listeners set up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; initEvents:function (){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on (app.bufferLayer_p, 'edits-complete', function (adds,updates,deletes){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("your edits are complete in bufferLayer_p");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGrid.populateGrid(app.bufferLayer_p,app.totalsGrid_p);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on(app.bufferLayer_p, "error", function (err){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("error in bufferLayer_p: " + err.message);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on.once(app.bufferLayer_p, 'update-end', function(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("update-end on app.bufferLayer_p")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGrid.populateGrid(app.bufferLayer_p,app.totalsGrid_p);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on (app.bufferLayer_c, 'edits-complete', function (adds,updates,deletes){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("your edits are complete in bufferLayer_c");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGrid.populateGrid(app.bufferLayer_c,app.totalsGrid_c);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on(app.bufferLayer_c, "error", function (err){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("error in bufferLayer_c: " + err.message);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; on.once(app.bufferLayer_c, 'update-end', function(){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myGrid.populateGrid(app.bufferLayer_c,app.totalsGrid_c);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("update-end on app.bufferLayer_c")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;It doesn't look like the update-end event is ever firing for my 2nd layer, the one I'm calling app.bufferLayer_p.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I could figure out how to use js-bin for something this complicated, I would.&amp;nbsp; Instead, I'm attaching my code.&amp;nbsp;&amp;nbsp; In order to try this out, you must A) open the buffer tool&lt;/P&gt;&lt;P&gt;B) Click enable buffer&lt;/P&gt;&lt;P&gt;C) zoom in closer to the map so you can see the cities.&amp;nbsp;&amp;nbsp; The idea is that we're looking at statistics centered around a specific town, so the buffer will have an attribute for City.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 17:13:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-a-grid-once-edits-have-been-applied/m-p/616397#M57600</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-12-17T17:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Populate a grid once edits have been applied</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-a-grid-once-edits-have-been-applied/m-p/616398#M57601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tracy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the myBufferTools.js, where you create the ToggleButton, In the onChange event you are just setting the visibility of the app.bufferLayer_c only and not for app.bufferLayer_p hence, the 'update_end' event is not being fired for that layer. if you change that then the other grid will also populate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this was helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thejus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 17:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-a-grid-once-edits-have-been-applied/m-p/616398#M57601</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2015-12-17T17:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Populate a grid once edits have been applied</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-a-grid-once-edits-have-been-applied/m-p/616399#M57602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought I'd combed through all instances of app.bufferLayer_c and added in app.buffer_p.&amp;nbsp; Obviously not.&amp;nbsp;&amp;nbsp; I was making this much too complicated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Dec 2015 19:12:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/populate-a-grid-once-edits-have-been-applied/m-p/616399#M57602</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-12-17T19:12:37Z</dc:date>
    </item>
  </channel>
</rss>

