<?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: Problem to Access fields from the feature layer in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-to-access-fields-from-the-feature-layer/m-p/214605#M5385</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your code should work if it's executed after the layer has been initialized (e.g in&lt;/SPAN&gt;&lt;SPAN style="color:black;"&gt; FeatureLayer_Initialized)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:black;"&gt;When is executed your code behind?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Aug 2010 12:03:12 GMT</pubDate>
    <dc:creator>DominiqueBroux</dc:creator>
    <dc:date>2010-08-30T12:03:12Z</dc:date>
    <item>
      <title>Problem to Access fields from the feature layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-to-access-fields-from-the-feature-layer/m-p/214604#M5384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is the xaml code where i am assigning the layer which is to be my featurelayer which has been highlighted with maroon color . And below that is my code behind .. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting error when i try to access the field names of the layer . I get 0 fields . Can anybody help out with this prob .. Thanks &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;Grid.Resources&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esriSymbols:SimpleFillSymbol x:Name="MyMarkerSymbol" Fill="Chocolate" BorderThickness="2" BorderBrush="Aqua" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/Grid.Resources&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esri:Map Background="White" Name="Map1"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esri:Map.Layers&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:ArcGISDynamicMapServiceLayer ID="mymap" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer" rel="nofollow" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer&lt;/A&gt;&lt;SPAN&gt;" Initialized="ArcGISTiledMapServiceLayer_Initialized"/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="city" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/2" rel="nofollow" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/2&lt;/A&gt;&lt;SPAN&gt;" FeatureSymbol="{StaticResource MyMarkerSymbol}" Initialized="FeatureLayer_Initialized"/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esri:Map.Layers&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esri:Map&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;StackPanel Orientation="Horizontal"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;ComboBox Name="field" Width="119" Height="50"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/StackPanel&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/Grid&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code Behind code &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim f As ESRI.ArcGIS.Client.Layer = CType(Map1.Layers("city"), ESRI.ArcGIS.Client.Layer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim a As ESRI.ArcGIS.Client.FeatureLayer = CType(f, ESRI.ArcGIS.Client.FeatureLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim i As Integer = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If Not a.LayerInfo Is Nothing Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; For i = 0 To a.LayerInfo.Fields.Count - 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; field.Items.Add(a.LayerInfo.Fields(i).Type)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 00:11:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-to-access-fields-from-the-feature-layer/m-p/214604#M5384</guid>
      <dc:creator>VikramS</dc:creator>
      <dc:date>2010-08-30T00:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem to Access fields from the feature layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-to-access-fields-from-the-feature-layer/m-p/214605#M5385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your code should work if it's executed after the layer has been initialized (e.g in&lt;/SPAN&gt;&lt;SPAN style="color:black;"&gt; FeatureLayer_Initialized)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color:black;"&gt;When is executed your code behind?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 12:03:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/problem-to-access-fields-from-the-feature-layer/m-p/214605#M5385</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2010-08-30T12:03:12Z</dc:date>
    </item>
  </channel>
</rss>

