ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TableView Class / GetSelectedFields Method
Example

In This Topic
    GetSelectedFields Method (TableView)
    In This Topic
    Gets the set of selected fields in the table view.
    Syntax
    public IReadOnlyList<string> GetSelectedFields()
    Public Function GetSelectedFields() As IReadOnlyList(Of String)
    Example
    Select Fields
    var tv = TableView.Active;
    if (tv == null)
      return;
    
    // get selected fields
    var selectedfields = tv.GetSelectedFields();
    
    // set selected fields
    tv.SetSelectedFields(new List<string> { "CITY_FIPS", "STATE_FIPS" });
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also