ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TableView Class / SetHiddenFields Method
Example

In This Topic
    SetHiddenFields Method (TableView)
    In This Topic
    Sets the specified fields to be hidden in the table view UI. The specified list of fields are added to any existing fields that are already hidden. To display all fields use ShowAllFields.
    Syntax
    Public Sub SetHiddenFields( _
       ByVal fieldNames As List(Of String) _
    ) 
    public void SetHiddenFields( 
       List<string> fieldNames
    )

    Parameters

    fieldNames
    Example
    Show or Hide Fields
    {
      // get list of hidden fields
      var hiddenFields = tableView.GetHiddenFields();
    
      // show all fields
      if (tableView.CanShowAllFields)
        tableView.ShowAllFields();
    
      // hide only "CITY_FIPS", "STATE_FIPS"
      if (tableView.CanShowAllFields)
      {
        // show all fields
        tableView.ShowAllFields();
        tableView.SetHiddenFields(["CITY_FIPS", "STATE_FIPS"]);
      }
    
      // add "STATE_NAME to set of hidden fields
      tableView.SetHiddenFields(["STATE_NAME"]);
    
      // hide selected fields
      if (tableView.CanHideSelectedFields)
        tableView.HideSelectedFields();
    }
    Requirements

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

    ArcGIS Pro version: 3.1 or higher.
    See Also