ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TableView Class / CanHighlight Property
Example

In This Topic
    CanHighlight Property (TableView)
    In This Topic
    Gets if rows can be highlighted in the table view. The table view must be showing the Selected Records view.
    Syntax
    Public ReadOnly Property CanHighlight As Boolean
    public bool CanHighlight {get;}
    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.1 or higher.
    See Also