ArcGIS Pro 3.3 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 IReadOnlyList<long> GetHighlightedObjectIds()
    Public Function GetHighlightedObjectIds() As IReadOnlyList(Of Long)

    Return Value

    A read-only list of object ids.
    Example
    Get highlighted row indexes
    var tv = TableView.Active;
    if (tv == null)
      return;
    
    QueuedTask.Run(async () =>
    {
      IReadOnlyList<long> highlightedOIDs = null;
      if (tv.CanGetHighlightedObjectIds)
        // get the set of selected objectIDs 
        highlightedOIDs = tv.GetHighlightedObjectIds();
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also