Problem when deleting features from shape file

Topics: SharpMap Project, SharpMap v2.0
Oct 5, 2009 at 1:46 PM
Edited Oct 5, 2009 at 1:48 PM

Hello everyone

I'm using SharpMap v 2.0 and when I tried to delete feature using this function

((GeometryLayer)geometryLayer).Features.RemoveRow(featureDataRow);

there was no result the object was still there.

after that I tried to use IWritableFeatureProvider  Delete function.

((IWritableFeatureProvider)featureProvider).Delete(featureDataRow);

this works only after I'm reloaded the layer again.

Please tell me where I'm wrong.

 

best regards Faxy

Coordinator
Oct 5, 2009 at 5:16 PM

To delete a feature from the shapefile you need the IWritableFeatureProvider.Delete but this will not automatically refresh the UI (as you have found) this is by design hth jd