I'm trying to select records with QueryFilter ont Table.
I think selection operation is ok. But why the current Attribute Table on ArcGIS Pro Pane is not updated.
It's maybe a common question but i'm novice with the ARGIS Pro SDK.
see code below :
featureLayer = MapView.Active?.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();
if (featureLayer == null)
return;
await QueuedTask.Run(() => {
using (Table enterpriseTable = featureLayer.GetTable())
{
QueryFilter anotherQueryFilter = new QueryFilter { WhereClause = "state = 1" };
// If you want to select all the records in a table.
using (Selection allRecordSelection = enterpriseTable.Select(anotherQueryFilter, SelectionType.ObjectID, SelectionOption.Normal))
{
int cnt= allRecordSelection.GetCount();
}
}
});
Thanks