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

SetFrozenFieldsAsync Method (TableView)
Sets the specified fields to be frozen in the table view. Frozen fields are promoted to be the first visible fields in the table view and stay visible as the table view is scrolled horizontally. A divider bar is placed between the frozen fields and the remaining fields in the table. The specified list of fields are added to any existing fields that are already frozen.
Syntax
public Task SetFrozenFieldsAsync( 
   List<string> fieldNames
)

Parameters

fieldNames
Example
Freeze Fields
var tv = TableView.Active;
if (tv == null)
  return;

// get list of frozen fields
var frozenfields = tv.GetFrozenFields();

// un freeze all fields
await tv.ClearAllFrozenFieldsAsync();


// freeze a set of fields
await tv.SetFrozenFieldsAsync(new List<string> { "CITY_FIPS", "STATE_FIPS" });
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.1 or higher.
See Also