<?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: Detect one or more rows selected in an attribute table from an add-in in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/detect-one-or-more-rows-selected-in-an-attribute/m-p/1518502#M11951</link>
    <description>&lt;P&gt;Did you ever run into GC issues and need to use &lt;EM&gt;keepSubscriberAlive&lt;/EM&gt; like mentioned in the following ticket?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/sketchcompletedevent-firing-only-sometimes/m-p/1323595" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/sketchcompletedevent-firing-only-sometimes/m-p/1323595&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm using your approach and everything seems to be working well whether or not I use &lt;EM&gt;keepSubscriberAlive&lt;/EM&gt; but maybe my tests aren't rigorous enough.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2024 18:04:06 GMT</pubDate>
    <dc:creator>jmidtlyng</dc:creator>
    <dc:date>2024-08-12T18:04:06Z</dc:date>
    <item>
      <title>Detect one or more rows selected in an attribute table from an add-in</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/detect-one-or-more-rows-selected-in-an-attribute/m-p/781446#M1150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With ArcGIS Pro SDK 2.5, you can detect that the map selection has changed with the MapSelectionChangedEvent, which also includes selecting one or many rows in the attribute table of a geodatabase that is loaded in a MapView. I know that I can wire it up like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;private SubscriptionToken eventToken = null;&lt;/P&gt;&lt;P&gt;private void SetupEvents() &lt;BR /&gt;{ &lt;BR /&gt;eventToken = MapSelectionChangedEvent.Subscribe(OnMapSelectionChangedEvent); &lt;BR /&gt;} &lt;BR /&gt;private void OnMapSelectionChangedEvent(MapSelectionChangedEventArgs obj) &lt;BR /&gt;{ &lt;BR /&gt;//do work on the selection &lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;I would prefer to isolate the work in the handler to only happen when the geodatabase's attribute table row selection changes, not on all map selections. I haven't been able to find an event that fits this qualification in the sdk. Does one exist?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT 3/19/2020&lt;/STRONG&gt;:&amp;nbsp; Since it may be unclear what I'm attempting to achieve, the below image has the MapView and the open attribute table.&amp;nbsp; I would like for the selection of a row in that table to trigger an event in my add-in.&amp;nbsp; The MapSelectionChangedEvent is far too broad for this purpose, so if there is a SelectionChanged event or the like on the attribute table that I can hook into, that would work.&amp;nbsp; I cannot seem to find one, though.&amp;nbsp; I can select something from the add-in and have it show on the map, but I wanted to know if something existed on this built in control.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="485705" alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/485705_tableedit.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2020 18:27:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/detect-one-or-more-rows-selected-in-an-attribute/m-p/781446#M1150</guid>
      <dc:creator>JustinMartinek</dc:creator>
      <dc:date>2020-03-16T18:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Detect one or more rows selected in an attribute table from an add-in</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/detect-one-or-more-rows-selected-in-an-attribute/m-p/781447#M1151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After contacting ESRI Support, there is no way to actually achieve this through a singular event, but you can do them in tandem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The suggested approach was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;private SubscriptionToken eventToken = null;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;private void SetupPaneEvent()&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;{&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;eventToken = ActivePaneChangedEvent.Subscribe(OnActivePaneChangedEvent);&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;private void OnActivePaneChangedEvent(PaneEventArgs args)&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//The window that is selected is a table, so then register an event that handles selections&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (FrameworkApplication.Panes.ActivePane is ITablePane)&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;eventToken = MapSelectionChangedEvent.Subscribe(OnMapSelectionChangedEvent);&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// not a table?&amp;nbsp; Unsubscribe.&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MapSelectionChangedEvent.Unsubscribe(eventToken);&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;private void OnMapSelectionChangedEvent(MapSelectionChangedEventArgs args)&lt;/SPAN&gt;&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Do work that detects which source and how you need to filter out different actions between feature classes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;//and stand alone tables&lt;BR style="color: #323130; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #323130; background-color: #ffffff;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2020 15:45:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/detect-one-or-more-rows-selected-in-an-attribute/m-p/781447#M1151</guid>
      <dc:creator>JustinMartinek</dc:creator>
      <dc:date>2020-04-06T15:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Detect one or more rows selected in an attribute table from an add-in</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/detect-one-or-more-rows-selected-in-an-attribute/m-p/1518502#M11951</link>
      <description>&lt;P&gt;Did you ever run into GC issues and need to use &lt;EM&gt;keepSubscriberAlive&lt;/EM&gt; like mentioned in the following ticket?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/sketchcompletedevent-firing-only-sometimes/m-p/1323595" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/sketchcompletedevent-firing-only-sometimes/m-p/1323595&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm using your approach and everything seems to be working well whether or not I use &lt;EM&gt;keepSubscriberAlive&lt;/EM&gt; but maybe my tests aren't rigorous enough.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 18:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/detect-one-or-more-rows-selected-in-an-attribute/m-p/1518502#M11951</guid>
      <dc:creator>jmidtlyng</dc:creator>
      <dc:date>2024-08-12T18:04:06Z</dc:date>
    </item>
  </channel>
</rss>

