ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TableView Class / Highlight Method / Highlight(IEnumerable<Int64>,Boolean) Method
The row indexes or object ids to highlight.
Indicates that the ids are object ids, otherwise they are row indexes.
Example

In This Topic
    Highlight(IEnumerable<Int64>,Boolean) Method
    In This Topic
    Highlights rows in the table view.
    Syntax
    Public Overloads Function Highlight( _
       ByVal ids As IEnumerable(Of Long), _
       ByVal idsAreObjectIds As Boolean _
    ) As Task

    Parameters

    ids
    The row indexes or object ids to highlight.
    idsAreObjectIds
    Indicates that the ids are object ids, otherwise they are row indexes.
    Example
    Change highlighted rows
    {
      // Note: Needs QueuedTask to run
      {
        // get list of current selected objectIDs
        IReadOnlyList<long> selectedObjectIds = tableView.GetSelectedObjectIds();
        List<long> idsToHighlight = [];
    
        // add the first two selected objectIds to highlight
        if (selectedObjectIds.Count >= 2)
        {
          idsToHighlight.Add(selectedObjectIds[0]);
          idsToHighlight.Add(selectedObjectIds[1]);
        }
    
        // highlight
        if (tableView.CanHighlight)
          tableView.Highlight(idsToHighlight, true);
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.3 or higher.
    See Also