ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TableView Class / SetActiveField Method / SetActiveField(String) Method
Example

In This Topic
    SetActiveField(String) Method
    In This Topic
    Sets the active field in the table view.
    Syntax
    Public Overloads Sub SetActiveField( _
       ByVal fieldName As String _
    ) 
    public void SetActiveField( 
       string fieldName
    )

    Parameters

    fieldName
    Example
    Get or set the Active Field
    {
      // get active field, active field name
      var activeFieldIdx = tableView.ActiveFieldIndex;
      var fldDesc = tableView.GetField(activeFieldIdx);
      var fldName = fldDesc.Name;
    
      // set active field by name
      tableView.SetActiveField("STATE_NAME");
    
      // or set active field by index
      tableView.SetActiveField(3);
    }
    Requirements

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

    ArcGIS Pro version: 3.1 or higher.
    See Also