public IReadOnlyList<long> GetSelectedRowIndexes()
Public Function GetSelectedRowIndexes() As IReadOnlyList(Of Long)
Return Value
A read-only list of object ids.
public IReadOnlyList<long> GetSelectedRowIndexes()
Public Function GetSelectedRowIndexes() As IReadOnlyList(Of Long)
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
var tv = TableView.Active; if (tv == null) return; QueuedTask.Run(async () => { // get the set of selected objectIDs var selOids = tv.GetSelectedObjectIds(); // get the set of selected row indexes var selRows = tv.GetSelectedRowIndexes(); });
var tv = TableView.Active; if (tv == null) return; QueuedTask.Run(async () => { // set of selected OIDS var newoids = new List<long>(); newoids.AddRange(new List<long>() { 10, 15, 17 }); tv.Select(newoids, true); // add to set of selected row indexes var selRows = tv.GetSelectedRowIndexes(); var newRows = new List<long>(selRows); newRows.AddRange(new List<long>() { 21, 35 }); tv.Select(newRows, false); });
Target Platforms: Windows 11, Windows 10