DisableClientCaching = true AutoSave = False OutFields = * Mode = OnDemand Where = "OBJECTID = 0"
private void FeatureLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e) { removed = false; e.Graphic.AttributeValueChanged -= Graphic_AttributeValueChanged; this.MyFeatureDataForm.GraphicSource = e.Graphic; e.Graphic.AttributeValueChanged += Graphic_AttributeValueChanged; } bool removed = false; void Graphic_AttributeValueChanged(object sender, Graphics.DictionaryChangedEventArgs e) { if (e.Key == "REMOVED") removed = true; } private void FeatureLayer_EndSaveEdits(object sender, Tasks.EndEditEventArgs e) { if (removed) (sender as FeatureLayer).Update(); }
FeatureForm.GraphicSource.Attributes["REMOVED"] = DateTime.Now.ToString();
All other funtions are working like they should except for one thing. I disabled the DeleteSelected button and replaced it with a method that flags a "REMOVED" field. The MXD for that map has a Definition Query that only allows features where REMOVED IS NULL. This method work fine, but when I hit the Save button, the feature is still there.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.