Background: I have C#, ArcGIS command that 1. lists selected features, and 2. allows you to delete selected features from this list out of a geodatabase.

My problem: After I delete features, ArcGIS doesn't update the selected features list. When my program asks ArcGIS for the selected features, it gets back references to the features it already deleted. It shouldn't.

My Question: What should I do to tell ArcGIS to check the selected features list for non-existent features? Is there a "refresh" command that will do this, or do I have to reselect the features (excluding the deleted ones) programmatically?

1 Answer 1


Are you in ArcMap? How exactly are you deleting features from the geodatabase? When you use IEditor to do those edits, changes to selection when deleting features should propagate properly.

You might also try casting the Map to ISelectionEvents and calling SelectionChanged to notify of selection change.

  • Thank you for your answer and your good questions. I am in ArcMap. The query is being done via a database connection (OleDbConnection), rather than using IEditor. I would fix it to use IEditor but it would involve a lot of rewiring. I will try your proposed solution.
    – canisrufus
    Jul 11, 2012 at 16:06
  • SelectionChanged didn't work for me. What I ultimately did was call Refresh on the SelectionSet object. I'm accepting your answer because it got me on track to a solution.
    – canisrufus
    Jul 11, 2012 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.