ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TableView Class / GetHighlightedObjectIds Method
Example

In This Topic
    GetHighlightedObjectIds Method (TableView)
    In This Topic
    Gets all the highlighted object ids from the data source.
    Syntax
    Public Function GetHighlightedObjectIds() As IReadOnlyList(Of Long)
    public IReadOnlyList<long> GetHighlightedObjectIds()

    Return Value

    A read-only list of object ids.
    Example
    Get highlighted row indexes
    {
      // Note: Needs QueuedTask to run
      {
        IReadOnlyList<long> highlightedOIDs = null;
        if (tableView.CanGetHighlightedObjectIds)
          // get the set of selected objectIDs 
          highlightedOIDs = tableView.GetHighlightedObjectIds();
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.1 or higher.
    See Also