Select to view content in your preferred language

How to stop the EditVertices by code?

1081
3
04-11-2011 12:46 PM
FrancoisChartrand
Emerging Contributor
Hi,

I'm using the EditVertices command (from the Editor class) with a GraphicsLayer to edit geometries.

The CancelActive command allows me to cancel the current edition but is there another command (or any other line of code) that would allow me to stop the edition without cancelling it?

The only way to stop the edition is to click on the geometry that is being edited or another geometry but what if I want to stop editing without a user click (e.g. an apply button)?

You can easily reproduce this behaviour using this sample.

Thank you
0 Kudos
3 Replies
FrancoisChartrand
Emerging Contributor
Using Reflector, I discovered that the function I need to call is:
ESRI.ArcGIS.Client.FeatureService.Editing.Editor.StopEdit()

However it is not exposed in the API: the ESRI.ArcGIS.Client.FeatureService.Editing.Editor class is internal.

Any workaround?
0 Kudos
NickKohler
New Contributor
I have experienced this as well. I would also like to know how we can work around this, as the users we have had testing the editing functionality of our application do not think to de-select the geometry they just edited to commit the changes. It really isn't intuitive to make a user do that. If there are no workarounds as of now, are there changes in version 2.2 that will allow programmatic completion of edits?
0 Kudos
JenniferNery
Esri Regular Contributor
The current version of the API does not allow you to stop EditVertices in code-behind. However, we are looking into exposing this in the future releases.

This is related thread: http://forums.arcgis.com/threads/26034-Unable-to-save-edits-to-graphics-on-GraphicsLayer-using-Edito...
0 Kudos