AnsweredAssumed Answered

Detect one or more rows selected in an attribute table from an add-in

Question asked by jmartinek on Mar 16, 2020
Latest reply on Apr 6, 2020 by jmartinek

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:

private SubscriptionToken eventToken = null;

private void SetupEvents()
{
eventToken = MapSelectionChangedEvent.Subscribe(OnMapSelectionChangedEvent);
}
private void OnMapSelectionChangedEvent(MapSelectionChangedEventArgs obj)
{
//do work on the selection
}


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?

 

EDIT 3/19/2020:  Since it may be unclear what I'm attempting to achieve, the below image has the MapView and the open attribute table.  I would like for the selection of a row in that table to trigger an event in my add-in.  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.  I cannot seem to find one, though.  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.

 

Outcomes