<?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 Scroll my grid to the row I clicked in a featureLayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582211#M54350</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My map contains a featureLayer and an OnDemandGrid.&amp;nbsp; The grid appears in a side panel and it's tied to an extent-change listener so that it only lists the features in the current map extent.&amp;nbsp; The grid has a click event that zooms and opens an infoWindow when the user selects a row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to have a click on my featureLayer also tie back to my grid.&amp;nbsp; I'd like the grid to scroll to the row corresponding to the feature the user just clicked on.&amp;nbsp; The ID on the row is the OBJECTID of the feature, so there is a common piece of information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a link to an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsfiddle.net/schlot/xpsngfp9/" title="http://jsfiddle.net/schlot/xpsngfp9/"&gt;featureLayer_grid - JSFiddle&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2015 18:58:34 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2015-08-04T18:58:34Z</dc:date>
    <item>
      <title>Scroll my grid to the row I clicked in a featureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582211#M54350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My map contains a featureLayer and an OnDemandGrid.&amp;nbsp; The grid appears in a side panel and it's tied to an extent-change listener so that it only lists the features in the current map extent.&amp;nbsp; The grid has a click event that zooms and opens an infoWindow when the user selects a row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to have a click on my featureLayer also tie back to my grid.&amp;nbsp; I'd like the grid to scroll to the row corresponding to the feature the user just clicked on.&amp;nbsp; The ID on the row is the OBJECTID of the feature, so there is a common piece of information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a link to an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsfiddle.net/schlot/xpsngfp9/" title="http://jsfiddle.net/schlot/xpsngfp9/"&gt;featureLayer_grid - JSFiddle&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 18:58:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582211#M54350</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-04T18:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Scroll my grid to the row I clicked in a featureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582212#M54351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tracy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This has come-up a couple of times... one of them was for feature tables... &lt;A href="https://community.esri.com/thread/123034"&gt;Interactive FeatureTable Digit&lt;/A&gt;​ I don't believe a resolution was found for this thread, however.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your sample, I quickly cleaned-up some stuff in jsfiddle - &lt;A href="http://jsfiddle.net/xpsngfp9/4/" title="http://jsfiddle.net/xpsngfp9/4/"&gt;featureLayer_grid - JSFiddle&lt;/A&gt; - and added an event to show you how to get OID from the click:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/120642_pastedImage_3.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should get you on the right direction on linking back to the grid!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 19:22:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582212#M54351</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2015-08-04T19:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Scroll my grid to the row I clicked in a featureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582213#M54352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In one of my app, I have a GraphicsLayer (layerDiveGraphics) with the features that are also in a dGrid (diveGrid). The grid contains some of the attributes of the feature, including the OBJECTID field. I'm also using the pausable on event with a checkbox to control when this happens, since it can be annoying to have the grid constantly scrolling as you move the mouse across the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;layerDiveGraphicsMouseOverEvent = on.pausable(layerDiveGraphics, "mouse-over", function (evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var id = evt.graphic.attributes.OBJECTID;
&amp;nbsp;&amp;nbsp;&amp;nbsp; diveGrid.clearSelection();
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (diveGrid.row(id).element !== null) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; diveGrid.select(id);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; diveGrid.row(id).element.scrollIntoView();
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
});
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582213#M54352</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-12T01:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Scroll my grid to the row I clicked in a featureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582214#M54353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm getting stuck with the issue that not all the rows are fully available until&amp;nbsp; you do some scrolling.&amp;nbsp; Even though I have a row that's been selected by it's ID, its element is null, so I'm never going to get past &lt;SPAN class="keyword" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; (diveGrid.row(id).element !== &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 19:33:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582214#M54353</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-04T19:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Scroll my grid to the row I clicked in a featureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582215#M54354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that is a strange error. I noticed if the grid doesn't contain too many rows, then it does work as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsfiddle.net/kenbuja/xpsngfp9/8/" title="http://jsfiddle.net/kenbuja/xpsngfp9/8/"&gt;featureLayer_grid - JSFiddle&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It varies...sometimes it can be 130 rows, other times it's only 30. Very maddening....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my application, it was working with all 2800 rows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 20:30:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582215#M54354</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-08-04T20:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Scroll my grid to the row I clicked in a featureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582216#M54355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't feel like this is a large data set, and it's just a sample I had small enough to easily pull together.&amp;nbsp; My final project has many more records (39K), so it must be a solution that works with a larger data set.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your solution of scrollIntoView works some of the time anyway.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 20:44:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582216#M54355</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-04T20:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scroll my grid to the row I clicked in a featureLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582217#M54356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would there be a way to somehow define 'element'?&amp;nbsp; When you look at it, it's always the same format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;element: div#gridDiv-row-1641.dgrid-row.dgrid-row-even.ui-state-default&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where 1641 corresponds to the OBJECTID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I'm just making stuff up.&amp;nbsp; Maybe there is something different I can use in the original construction of the grid?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2015 21:13:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scroll-my-grid-to-the-row-i-clicked-in-a/m-p/582217#M54356</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2015-08-04T21:13:10Z</dc:date>
    </item>
  </channel>
</rss>

