I have a button that when clicked modifies the attributes of selected lines. The problem is that the new attribute values don't show up as updated in the attribute table or the attribute window. But it seems to only occur on a clean undo/redo stack; if I click it again (on the same line or a different line), if I undo and then redo, if I put UndoAsync() then RedoAsync() in the code after the execute, or if I save edits and then re-select the features, the updated values show.
Here's the code:
EditOperation operation = new EditOperation();
operation.Name = "test edit";
FeatureLayer flayer = mapMember as FeatureLayer;
Selection selectedFeatures = flayer.GetSelection();
using (RowCursor rowCursor = selectedFeatures.Search())
{
while (rowCursor.MoveNext())
{
Feature feature = rowCursor.Current as Feature;
operation.Modify(feature, "NAME", "TEST");
}
}
operation.ExecuteAsync();