<?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 FeatureTable - Get Selected Rows in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1158129#M76808</link>
    <description>&lt;P&gt;How to get the list of selected rows from Feature Table &lt;U&gt;without&lt;/U&gt; using the&amp;nbsp;"selection-change" event of FeatureTable? Is there any straight method or way to get the selected rows?&lt;/P&gt;</description>
    <pubDate>Sat, 26 Mar 2022 14:16:03 GMT</pubDate>
    <dc:creator>Ranga_Tolapi</dc:creator>
    <dc:date>2022-03-26T14:16:03Z</dc:date>
    <item>
      <title>FeatureTable - Get Selected Rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1158129#M76808</link>
      <description>&lt;P&gt;How to get the list of selected rows from Feature Table &lt;U&gt;without&lt;/U&gt; using the&amp;nbsp;"selection-change" event of FeatureTable? Is there any straight method or way to get the selected rows?&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2022 14:16:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1158129#M76808</guid>
      <dc:creator>Ranga_Tolapi</dc:creator>
      <dc:date>2022-03-26T14:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable - Get Selected Rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1158883#M76849</link>
      <description>&lt;P&gt;Ranga,&lt;/P&gt;&lt;P&gt;Everytime the table's 'selection-change' event is fired it provides a list of rows added or removed from the selection.&amp;nbsp; So after you set up the FeatureTable, set up a watch on that event such as:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get the FeatureLayer's layerView and listen for the table's selection-change event
// Here I'm maintaining a list of features for use elsewhere
let lstFeatures = [];
aFTable.on("selection-change", function (changes) {
    var idxItem = 1;
    // If the selection is removed, remove the feature from the array
    changes.removed.forEach(function (item) {
        const data = lstFeatures.find(function (data) {
            return data.feature === item.feature;
        });
        if (data) {                    
            lstFeatures.splice(lstFeatures.indexOf(data), 1);
        }
    });

    // If the selection is added, push all added selections to array
    changes.added.forEach(function (item) {
        const feature = item.feature;
        lstFeatures.push({
            feature: feature
        });
    });
    zoomToSelectedFeature(aLayer, lstFeatures, aView);
});&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 29 Mar 2022 15:21:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1158883#M76849</guid>
      <dc:creator>JeffreyWilkerson</dc:creator>
      <dc:date>2022-03-29T15:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable - Get Selected Rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1159217#M76858</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/7278" target="_self"&gt;&lt;SPAN class=""&gt;JeffreyWilkerso&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;&lt;SPAN class=""&gt;Thank you for the response, appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;However, as mentioned, I am looking out for a solution &lt;U&gt;without&lt;/U&gt;&amp;nbsp;&lt;SPAN&gt;using the&amp;nbsp;"selection-change" event of FeatureTable?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 02:27:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1159217#M76858</guid>
      <dc:creator>Ranga_Tolapi</dc:creator>
      <dc:date>2022-03-30T02:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable - Get Selected Rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1159222#M76859</link>
      <description>&lt;P&gt;Just noticed this hidden property of FeatureTable. Hope it is okay to rely on this to get the selected rows of FeatureTable.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;FeatureTable.grid.selectedItems.items&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 30 Mar 2022 03:00:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1159222#M76859</guid>
      <dc:creator>Ranga_Tolapi</dc:creator>
      <dc:date>2022-03-30T03:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable - Get Selected Rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1159477#M76869</link>
      <description>&lt;P&gt;The property is hidden for a reason. You can use it if it works for now, but there is no guarantee that it won't be changed later on. We provided the event to get to the records so that you don't have to do this. I don't know the reasoning for not using this. Perhaps there is a use case that wasn't considered that needs to be, otherwise I would suggest the event as there is no support for undocumented properties, nor a guarantee that they won't change in any upcoming release.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 16:21:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1159477#M76869</guid>
      <dc:creator>HeatherGonzago</dc:creator>
      <dc:date>2022-03-30T16:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureTable - Get Selected Rows</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1159750#M76877</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/994" target="_self"&gt;&lt;SPAN class=""&gt;HeatherGonzago&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;I got enlighten, highly appreciated. Fully agree with you.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 04:01:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/featuretable-get-selected-rows/m-p/1159750#M76877</guid>
      <dc:creator>Ranga_Tolapi</dc:creator>
      <dc:date>2022-03-31T04:01:46Z</dc:date>
    </item>
  </channel>
</rss>

