ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TableView Class / ActiveObjectId Property
Example

In This Topic
    ActiveObjectId Property (TableView)
    In This Topic
    Gets the ObjectID of the active row in the table. The value of the row can be null, when the table does not have object ids, the active row is the new row, or the data for the row has not been loaded.
    Syntax
    public Nullable<long> ActiveObjectId {get;}
    Public ReadOnly Property ActiveObjectId As Nullable(Of Long)
    Example
    Get the active object ID
    //Get the active table view.
    var tableView = TableView.Active;
    if (tableView == null)
      return;
    
    // get the active objectID
    long? OID = tableView.ActiveObjectId;
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also