<?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: How to set default value for primary key column in EditWiget  for new feature? in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63034#M1577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;THanks. I think Will check it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This is related thread: &lt;A href="http://forums.arcgis.com/threads/9756-Undo-edits-of-the-EditorWidget"&gt;http://forums.arcgis.com/threads/9756-Undo-edits-of-the-EditorWidget&lt;/A&gt; (see post #9) to wire up to TemplatePicker's Editor.EditCompleted event.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Oct 2010 19:25:36 GMT</pubDate>
    <dc:creator>XiujuZhou</dc:creator>
    <dc:date>2010-10-22T19:25:36Z</dc:date>
    <item>
      <title>How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63025#M1568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an ArcGIS API for silverlight 2 application. it uses feature service in arcgis server 10 to do online editing feature. I use EditWiget to add new feature by selecting feature type from Template Picker in the wiget. after draw a new feature, the attribute box popup for editing. I need to set default value for a primary Key column, not allow user type in the box. the default value is passed by others which is known in code.&amp;nbsp; How to do that? Please help. Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 14:57:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63025#M1568</guid>
      <dc:creator>XiujuZhou</dc:creator>
      <dc:date>2010-10-22T14:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63026#M1569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Attribute window that you see from the EditorWidget and TemplatePicker, is our FeatureDataForm.&amp;nbsp; How the form looks like depends on the FeatureLayer.&amp;nbsp; What you define as OutFields in your FeatureLayer, will be the fields displayed on the form.&amp;nbsp;&amp;nbsp; If your FeatureLayer comes from a MapService, then everything will be read-only.&amp;nbsp; If your FeatureLayer comes from an editable FeatureService, then whatever type or settings the service had given its fields will also apply to the fields in the form.&amp;nbsp; In other words, to ensure that your primary key field is not editable, you have to make that setting in the feature service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can however, create your own attribute window and exclude the primary key field in your form so you can update this attribute with your default value.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 16:03:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63026#M1569</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-10-22T16:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63027#M1570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In addition to Jennifer's comments you could alternatively do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do not include your primary key field in your layer OutFields property if the value for your primary key field could be populated through your code. This way the primary key field won't show up in the edit attributes form of the editor widget control and there won't be any risk of overwriting that value by the end users.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 16:20:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63027#M1570</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2010-10-22T16:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63028#M1571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you. If the way you mentioned happens in the Editor Widget,&amp;nbsp; how to populate the primary key column in code? when I click the submit button in the attribute box, then directly save attributes to SDE table without code. How to make code involve before save? What class object should be used for adding attributes to feature of layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if the way you mentioned happens in a customized attribute window, can customized attribute window still use the advanced features in the attribute window of widge? like dropdown combo box for subtype column, calendar for date column and data validation? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In addition to Jennifer's comments you could alternatively do the following:&lt;BR /&gt;Do not include your primary key field in your layer OutFields property if the value for your primary key field could be populated through your code. This way the primary key field won't show up in the edit attributes form of the editor widget control and there won't be any risk of overwriting that value by the end users.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 17:01:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63028#M1571</guid>
      <dc:creator>XiujuZhou</dc:creator>
      <dc:date>2010-10-22T17:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63029#M1572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to listen to the Graphics.CollectionChanged handler of your FeatureLayer and for each new item set your primary key attribute.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 17:04:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63029#M1572</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2010-10-22T17:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63030#M1573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;THank you Ali. Does the way apply for editorWiget? Could you let me know where to catch the event Graphics.CollectionChanged? at what point? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You need to listen to the Graphics.CollectionChanged handler of your FeatureLayer and for each new item set your primary key attribute.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 17:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63030#M1573</guid>
      <dc:creator>XiujuZhou</dc:creator>
      <dc:date>2010-10-22T17:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63031#M1574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Listen to EditCompleted event handler of your EditorWidget. You should check for Editor.EditAction.Add for the Action peoperty of the EditEventArgs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 17:32:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63031#M1574</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2010-10-22T17:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63032#M1575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;good sigh. but I still have not get an entire picture. the piece of code I wrote below by follow your instruction:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private void Editor_EditCompleted(object sender, Editor.EditEventArgs e)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FeatureLayer myFeatureLayer = MyMap.Layers["dpcpoly"] as FeatureLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.Action.Equals(Editor.EditAction.Add))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you do me a bigger favor for further solution? Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Listen to EditCompleted event handler of your EditorWidget. You should check for Editor.EditAction.Add for the Action peoperty of the EditEventArgs.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 17:52:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63032#M1575</guid>
      <dc:creator>XiujuZhou</dc:creator>
      <dc:date>2010-10-22T17:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63033#M1576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is related thread: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/9756-Undo-edits-of-the-EditorWidget"&gt;http://forums.arcgis.com/threads/9756-Undo-edits-of-the-EditorWidget&lt;/A&gt;&lt;SPAN&gt; (see post #9) to wire up to TemplatePicker's Editor.EditCompleted event.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 18:43:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63033#M1576</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-10-22T18:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to set default value for primary key column in EditWiget  for new feature?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63034#M1577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;THanks. I think Will check it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This is related thread: &lt;A href="http://forums.arcgis.com/threads/9756-Undo-edits-of-the-EditorWidget"&gt;http://forums.arcgis.com/threads/9756-Undo-edits-of-the-EditorWidget&lt;/A&gt; (see post #9) to wire up to TemplatePicker's Editor.EditCompleted event.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 19:25:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/how-to-set-default-value-for-primary-key-column-in/m-p/63034#M1577</guid>
      <dc:creator>XiujuZhou</dc:creator>
      <dc:date>2010-10-22T19:25:36Z</dc:date>
    </item>
  </channel>
</rss>

