ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TableView Class / SetSelectedFields Method
Example Version

SetSelectedFields Method (TableView)
Sets the specified fields to be selected in the table view.
Syntax
public void SetSelectedFields( 
   List<string> fieldNames
)

Parameters

fieldNames
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