ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TableView Class / Highlight 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 Method (TableView)
    In This Topic
    Highlights rows in the table view.
    Syntax
    Public 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
    var tv = TableView.Active;
    if (tv == null)
      return;
    
    QueuedTask.Run(() =>
    {
      // get list of current selected objectIDs
      var selectedObjectIds = tv.GetSelectedObjectIds();
      var idsToHighlight = new List<long>();
    
      // add the first two selected objectIds to highlight
      if (selectedObjectIds.Count >= 2)
      {
        idsToHighlight.Add(selectedObjectIds[0]);
        idsToHighlight.Add(selectedObjectIds[1]);
      }
    
      // highlight
      if (tv.CanHighlight)
        tv.Highlight(idsToHighlight, true);
    });
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also