I think you nailed it. I'm just unsure how to
why couldn't you just set the attribute in a loop on the selected features?
Is there a way to take advantage of the FeatureData Grid to do this. It seems like I can change the values in the FeatureData Grid Cells but can't save the changes.
private void FeatureLayer_PropertyChanged(object sender, PropertyChangedEventArgs e){ var l = sender as FeatureLayer; if (e.PropertyName == "SelectedGraphics") { var total = (from g in l.SelectedGraphics select (int)g.Attributes["ftype"]).Sum(); }}
private void ExcuteBatchUpdate_Click(object sender, RoutedEventArgs e) { }
private void EditorWidget_EditCompleted(object sender, Editor.EditEventArgs e) { int total = 0; foreach (var edit in e.Edits) { if (edit.Graphic.Selected) total += (int)edit.Graphic.Attributes["ftype"]; } }
private void FeatureLayer_PropertyChanged(object sender, PropertyChangedEventArgs e) { var l = sender as FeatureLayer; if (e.PropertyName == "SelectedGraphics") { var total = (from g in l.SelectedGraphics select (int)g.Attributes["ftype"]).Sum(); } }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.