<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Editor Widget with Auto Update of Attribute in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-editor-widget-with-auto-update-of-attribute/m-p/500978#M12828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You might want to check EditAction (i.e. e.Editor.EditAction.Add), your code currently will set the attribute regardless of completed command. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is not a concern, you can also use FeatureLayer.BeginSaveEdits event, if any edit should trigger this attribute value change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is to update your service-defined PrototypeAttributes. EditorWidget contains TemplatePicker that allows you to add features based on feature type. Based on the selected feature type, a list of default attributes are used. This may be related thread: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/46116-Template-Picker-and-Multiple-Domain-Values-2.3-and-10-SP3"&gt;http://forums.arcgis.com/threads/46116-Template-Picker-and-Multiple-Domain-Values-2.3-and-10-SP3&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Dec 2011 21:48:13 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2011-12-19T21:48:13Z</dc:date>
    <item>
      <title>Using Editor Widget with Auto Update of Attribute</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-editor-widget-with-auto-update-of-attribute/m-p/500976#M12826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a simple app that uses the editor widget to add/move/remove points belonging to a feature class. What I need to do is have the application automatically set an attribute value that can't be changed by the user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see there are EditCompleted and EditActivated events, but I can't see how I'd use either to manipulate attribute values prior to a feature being saved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone point me to an example of doing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2011 19:51:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-editor-widget-with-auto-update-of-attribute/m-p/500976#M12826</guid>
      <dc:creator>EricKauffman</dc:creator>
      <dc:date>2011-12-19T19:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using Editor Widget with Auto Update of Attribute</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-editor-widget-with-auto-update-of-attribute/m-p/500977#M12827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, I'm replying to my own thread! Here is how I did this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the EditorWidget add a handler to the Edit Completed event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the xmal code behind, when you do this, it will automatically create an event handler. Complete the handler using this pattern:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private void MyEditorWidget_EditCompleted(object sender, Editor.EditEventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (Editor.Change change in e.Edits)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (change.Graphic.Attributes.ContainsKey("YOUR_COLUMN_NAME"))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; change.Graphic.Attributes["YOUR_COLUMN_NAME"] = YOUR_NEW_VALUE;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:59:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-editor-widget-with-auto-update-of-attribute/m-p/500977#M12827</guid>
      <dc:creator>EricKauffman</dc:creator>
      <dc:date>2021-12-11T21:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using Editor Widget with Auto Update of Attribute</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-editor-widget-with-auto-update-of-attribute/m-p/500978#M12828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You might want to check EditAction (i.e. e.Editor.EditAction.Add), your code currently will set the attribute regardless of completed command. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is not a concern, you can also use FeatureLayer.BeginSaveEdits event, if any edit should trigger this attribute value change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is to update your service-defined PrototypeAttributes. EditorWidget contains TemplatePicker that allows you to add features based on feature type. Based on the selected feature type, a list of default attributes are used. This may be related thread: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/46116-Template-Picker-and-Multiple-Domain-Values-2.3-and-10-SP3"&gt;http://forums.arcgis.com/threads/46116-Template-Picker-and-Multiple-Domain-Values-2.3-and-10-SP3&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2011 21:48:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/using-editor-widget-with-auto-update-of-attribute/m-p/500978#M12828</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-12-19T21:48:13Z</dc:date>
    </item>
  </channel>
</rss>

