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
Solved! Go to Solution.
Hi Thomas,
You can do the same select on featureLayer object:
featureLayer.Select(anotherQueryFilter, SelectionCombinationMethod.New);
It works in my code.
Hi Thomas,
You can do the same select on featureLayer object:
featureLayer.Select(anotherQueryFilter, SelectionCombinationMethod.New);
It works in my code.
Hi Thomas,
Gintautas is correct (you can also use StandaloneTable.Select).
--Rich
hi,
thank you all for answer. It's effectively an easy way to select objets on client side.
I'm not very familiar to code some process because i want to maximize client interactions.
So, i have a lot of questions again...