<?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: Buttons bound to Editor.Add command never enable in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688535#M17714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt; I appreciate your attention. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A better SDK sample to represent my problem is the 'Edit Tools - Explicit Save' sample, because it binds various Buttons to Editor Commands rather than using the EditorWidget that buries that all inside the widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using that sample with my services illustrates my problem - you'll see the 'Add Polygon' button is enabled when using its original ESRI services, it is disabled when using our services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, change the URLs for the GeometryService, BaseLayer, and FeatureLayer on lines 12, 18, 20 of EditToolsExplicitSave.xaml to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;A href="http://uadnrmaps.wi.gov/ArcGIS/rest/services/Geometry/GeometryServer"&gt;http://uadnrmaps.wi.gov/ArcGIS/rest/services/Geometry/GeometryServer&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://dnrmaps.wi.gov/ArcGIS/rest/services/DW_Map_Cached/EN_Lt_Basic_Terrain_Basemap_WTM_Ext/MapServer"&gt;http://dnrmaps.wi.gov/ArcGIS/rest/services/DW_Map_Cached/EN_Lt_Basic_Terrain_Basemap_WTM_Ext/MapServer&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://uadnrmaps.wi.gov/ArcGIS/rest/services/DG/DG_ELT_TestData_WTM_ext-edit/FeatureServer/2"&gt;http://uadnrmaps.wi.gov/ArcGIS/rest/services/DG/DG_ELT_TestData_WTM_ext-edit/FeatureServer/2&lt;/A&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;Also remove the Extent on line 16, it is inappropriate for our SR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And change the Add CommandParameter for the button on line 46 to 0, 1, or 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's the 'it works with Service A but not with Service B that is throwing me. Like there is some service property I'm missing?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2012 17:54:29 GMT</pubDate>
    <dc:creator>markcheyne</dc:creator>
    <dc:date>2012-06-26T17:54:29Z</dc:date>
    <item>
      <title>Buttons bound to Editor.Add command never enable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688531#M17710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A real hair puller.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got some Editor UI, with System.Windows.Controls.Buttons for various Select, Modify, Add commands. They are data bound in the XAML, like &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;Button x:Name="ButtonAddPolyline" Margin="2" Width="24" Height="24" ToolTipService.ToolTip="Add Polyline" Command="{Binding Add}" Tag="Polyline" Click="AddButton_Click"&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also have UI to select the edit layer and feature template. When I select a feature template for the polyline layer in my map, my code sets the Editor LayerIDs to that single layer, and sets the Add Command's parameter to be the TypeID of the selected feature template. Then this button should enable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;It WORKS&lt;/STRONG&gt;&lt;SPAN&gt; when I test my UI on an ESRI map service such as &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer" rel="nofollow" target="_blank"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;IT does NOT work&lt;/STRONG&gt;&lt;SPAN&gt; when I use my own feature service such as &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://uadnrmaps.wi.gov/ArcGIS/rest/services/DG/DG_ELT_TestData_WTM_ext-edit/FeatureServer" rel="nofollow" target="_blank"&gt;http://uadnrmaps.wi.gov/ArcGIS/rest/services/DG/DG_ELT_TestData_WTM_ext-edit/FeatureServer&lt;/A&gt;&lt;SPAN&gt;. Other commands such as various Select and Modify (EditVertices, Split, Reshape) DO enable as expected. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Is there anything special one must do with a feature class/dataset, MXD or feature service for Add to be enabled?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I've got:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;my feature classes are not registered as versioned&lt;/UL&gt;&lt;UL&gt;my feature classes have subtypes (the basis of the feature templates and TypeIDs used in the SL API), and the subtype column is also used for symbolization in the MXD using a unique value renderer.&lt;/UL&gt;&lt;UL&gt;my map service properties appear to be comparable with the ESRI one cited above.&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2012 17:39:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688531#M17710</guid>
      <dc:creator>markcheyne</dc:creator>
      <dc:date>2012-06-21T17:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Buttons bound to Editor.Add command never enable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688532#M17711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tested with your services and I didn't reproduce the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you set correctly the LayerIDs of the Editor Widget?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 12:32:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688532#M17711</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-06-22T12:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Buttons bound to Editor.Add command never enable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688533#M17712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dbroux - thanks very much for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you maybe send me a working example (zipped solution), or post snippets here? I am definitely missing something.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After your reply and my initial "no way!" reaction, I tried to duplicate your result - make a simplest-case editor from scratch -&lt;/SPAN&gt;&lt;STRONG&gt; With my service, I have the same problem&lt;/STRONG&gt;&lt;SPAN&gt; as always - I can use the EditVertices command successfully for example, but &lt;/SPAN&gt;&lt;STRONG&gt;Add never enables&lt;/STRONG&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;STRONG&gt;With the the same code, simply swapping in the ESRI service, Add enables fine.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am certainly setting the LayerIDs property to an array of one layerID at a time. I am also setting the Add CommandParameter to the typeid of one of the layer's subtypes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you explain why I wouldn't have problems with the ESRI service, but I do with mine? What effect could two different services have? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 19:09:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688533#M17712</guid>
      <dc:creator>markcheyne</dc:creator>
      <dc:date>2012-06-22T19:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Buttons bound to Editor.Add command never enable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688534#M17713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your services seems down for now, so I can't provide you a working example with them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But my previous test was simply based on the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#ToolkitEditorWidget"&gt;EditorWidget &lt;/A&gt;&lt;SPAN&gt;sample after replacing the ESRI services by yours.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jun 2012 10:17:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688534#M17713</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-06-23T10:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Buttons bound to Editor.Add command never enable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688535#M17714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt; I appreciate your attention. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A better SDK sample to represent my problem is the 'Edit Tools - Explicit Save' sample, because it binds various Buttons to Editor Commands rather than using the EditorWidget that buries that all inside the widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using that sample with my services illustrates my problem - you'll see the 'Add Polygon' button is enabled when using its original ESRI services, it is disabled when using our services.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, change the URLs for the GeometryService, BaseLayer, and FeatureLayer on lines 12, 18, 20 of EditToolsExplicitSave.xaml to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;A href="http://uadnrmaps.wi.gov/ArcGIS/rest/services/Geometry/GeometryServer"&gt;http://uadnrmaps.wi.gov/ArcGIS/rest/services/Geometry/GeometryServer&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://dnrmaps.wi.gov/ArcGIS/rest/services/DW_Map_Cached/EN_Lt_Basic_Terrain_Basemap_WTM_Ext/MapServer"&gt;http://dnrmaps.wi.gov/ArcGIS/rest/services/DW_Map_Cached/EN_Lt_Basic_Terrain_Basemap_WTM_Ext/MapServer&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://uadnrmaps.wi.gov/ArcGIS/rest/services/DG/DG_ELT_TestData_WTM_ext-edit/FeatureServer/2"&gt;http://uadnrmaps.wi.gov/ArcGIS/rest/services/DG/DG_ELT_TestData_WTM_ext-edit/FeatureServer/2&lt;/A&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;Also remove the Extent on line 16, it is inappropriate for our SR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And change the Add CommandParameter for the button on line 46 to 0, 1, or 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's the 'it works with Service A but not with Service B that is throwing me. Like there is some service property I'm missing?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 17:54:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688535#M17714</guid>
      <dc:creator>markcheyne</dc:creator>
      <dc:date>2012-06-26T17:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Buttons bound to Editor.Add command never enable</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688536#M17715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;finally solved my problem. It was a question of the datatype of the variable being assigned to the button's CommandParameter. You MUST set the button's CommandParameter to one of the layer's subtype values. AND the datatype has to match. That is, if the subtype column is integer with values 0,1, or 2, you can't set the CommandParameter to "0", "1" or "2", which is what will happen if for example you just do a 'CommandParameter="1"' in the Button's XAML. If you want to do it in XAML, you have to spell it out thusly:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;Button Command="{Binding Add}" Margin="2" &amp;nbsp; ToolTipService.ToolTip="Fire" &amp;nbsp; Content="Add Polygon"&amp;gt;&amp;nbsp; &amp;lt;Button.CommandParameter&amp;gt; &amp;nbsp; &amp;lt;sys:Int32&amp;gt;2&amp;lt;/sys:Int32&amp;gt;&amp;nbsp; &amp;lt;/Button.CommandParameter&amp;gt; &amp;lt;/Button&amp;gt; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you do it in code, make sure the value being assigned is the right type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once again, DUH.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 21:32:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/buttons-bound-to-editor-add-command-never-enable/m-p/688536#M17715</guid>
      <dc:creator>markcheyne</dc:creator>
      <dc:date>2012-06-26T21:32:49Z</dc:date>
    </item>
  </channel>
</rss>

