<?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: FeatureDataGrid Binding Issue in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83265#M1998</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm sure you are right Jennifer but for the life of me I can't figure out what I am doing wrong with the binding. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are some snapshots of my XAML as it sits right now, at the moment, I can select from the Parcels layer and the graphics will appear correctly in the map, nothing at all happens to the featuredatagrid though. In the code behind I commented out Code Sections 1 &amp;amp; 2. Is there something more to it then going to the Map Property, choosing Binding then Element Name = myMap then for Graphicslayer binding I chose Elementname as Parcels, which is the name defined in XAML for a Featurelayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esri:Map x:Name="myMap" IsLogoVisible="False" VerticalContentAlignment="Center"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esri:Map.Extent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esriGeometry:Envelope XMin="1396056" YMin="154236" XMax="1443794" YMax="206608"&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esriGeometry:Envelope.SpatialReference&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esriGeometry:SpatialReference WKID="3419" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esriGeometry:Envelope.SpatialReference&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esriGeometry:Envelope&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esri:Map.Extent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="TiledAerial" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5:80/ArcGIS/rest/services/AerialPhotos/MapServer" rel="nofollow" target="_blank"&gt;http://sql2k5:80/ArcGIS/rest/services/AerialPhotos/MapServer&lt;/A&gt;&lt;SPAN&gt;" x:Name="Aerial" Visible="False" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:ArcGISDynamicMapServiceLayer ID="CityBasic" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5:80/ArcGIS/rest/services/CityBasic/MapServer" rel="nofollow" target="_blank"&gt;http://sql2k5:80/ArcGIS/rest/services/CityBasic/MapServer&lt;/A&gt;&lt;SPAN&gt;" x:Name="CityBasic"/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:ArcGISDynamicMapServiceLayer ID="Violations" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5:80/ArcGIS/rest/services/Violations/MapServer" rel="nofollow" target="_blank"&gt;http://sql2k5:80/ArcGIS/rest/services/Violations/MapServer&lt;/A&gt;&lt;SPAN&gt;" x:Name="Violations" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:FeatureLayer x:Name="Parcels" ID="Parcels" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5/ArcGIS/rest/services/CityBasic/MapServer/8" rel="nofollow" target="_blank"&gt;http://sql2k5/ArcGIS/rest/services/CityBasic/MapServer/8&lt;/A&gt;&lt;SPAN&gt;" Mode="SelectionOnly" FeatureSymbol="{StaticResource SelectSymbol}" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:ArcGISDynamicMapServiceLayer x:Name="CityInfoGroup" ID="CityInfoGroup" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5:80/arcgis/rest/services/CityInfoGroup/MapServer" rel="nofollow" target="_blank"&gt;http://sql2k5:80/arcgis/rest/services/CityInfoGroup/MapServer&lt;/A&gt;&lt;SPAN&gt;" Visible="False" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esri:Map&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esriToolkit:FeatureDataGrid x:Name="featureGrid1" Map="{Binding ElementName=myMap}" GraphicsLayer="{Binding ElementName=Parcels}"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;!--&amp;lt;esriToolkit:FeatureDataGrid.Columns &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;slData:DataGridTextColumn CanUserSort="True" SortMemberPath="PARCEL" Binding="{Binding Attributes[PARCEL]}" Header="Parcel No." /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;slData:DataGridTextColumn CanUserSort="True" Binding="{Binding Attributes[PRPDNO]}" Header="Address" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;slData:DataGridTextColumn CanUserSort="True" Binding="{Binding Attributes[PRPDST]}" Header="Street" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;slData:DataGridTextColumn CanUserSort="True" Binding="{Binding Attributes[OWNERS]}" Header="Owners" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esriToolkit:FeatureDataGrid.Columns&amp;gt;--&amp;gt; &amp;lt;/esriToolkit:FeatureDataGrid&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Nov 2010 13:21:28 GMT</pubDate>
    <dc:creator>KeithGanzenmuller</dc:creator>
    <dc:date>2010-11-09T13:21:28Z</dc:date>
    <item>
      <title>FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83263#M1996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Having a bear of a time figuring this one out so I am going to post some of the code to see if there is something obvious I am doing wrong. In theory this should be fairly straight forward following the online samples.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Query for some features, display the selected graphics and populate the feature datagrid. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the beginning of some code defining and executing a query task part way down in a Sub:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; myGraphicsLayer.ClearGraphics()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; SelectionText.Text = _toolBar&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; Dim queryTask As New Tasks.QueryTask("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5/ArcGIS/rest/services/CityBasic/MapServer/8" rel="nofollow" target="_blank"&gt;http://sql2k5/ArcGIS/rest/services/CityBasic/MapServer/8&lt;/A&gt;&lt;SPAN&gt;")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AddHandler queryTask.ExecuteCompleted, AddressOf QueryTask_ExecuteCompleted&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; AddHandler queryTask.Failed, AddressOf QueryTask_Failed&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Code Section 1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim resultFeaturesBinding As New Binding("LastResult.Features")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; resultFeaturesBinding.Source = queryTask&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; featureGrid1.SetBinding(DataGrid.ItemsSourceProperty, resultFeaturesBinding)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'End Section 1 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim query As Query = New ESRI.ArcGIS.Client.Tasks.Query()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; ' Specify fields to return from query&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; query.OutFields.AddRange(New String() {"SHAPE", "PARCEL", "PRPDNO", "PRPDST", "OWNERS"})&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; query.Geometry = args.Geometry&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; query.ReturnGeometry = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; queryTask.ExecuteAsync(query)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'NEW SUB&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Private Sub QueryTask_ExecuteCompleted(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.Tasks.QueryEventArgs)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MyDrawObject.IsEnabled = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim featureSet As FeatureSet = args.FeatureSet&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; If featureSet Is Nothing OrElse featureSet.Features.Count &amp;lt; 1 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MessageBox.Show("No features returned from query")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Return&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; For Each feature As Graphic In featureSet.Features&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; feature.Symbol = TryCast(LayoutRoot.Resources("PolyFillSymbol"), Symbol)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; myGraphicsLayer.Graphics.Add(feature)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Next feature&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Code Section 2 ' &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;featureGrid1.ItemsSource = featureSet.Features&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'End Section 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; _toolBar = " "&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So here is the problem, if I include the binding code in Section1, then I get an error in my for each loop at "myGraphicsLayer.Graphics.Add(feature)", inside the error details it mentions System.Reflection.TargetException: Object does not match target type. If comment out the binding code, my graphics add to map but no info into the featuredatagrid. If I add the line at Section 2 "featureGrid1.ItemsSource = featureSet.Features" &amp;amp; comment out Section 1, I get the graphics and the featuredatagrid info, but it crashes if I try to use Zoom to Select.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The real kicker, if I comment out both Section 1 &amp;amp; 2, I get the graphics and the grid shows lines but they are blank. If I select a blank line, its shows the line selected and will zoom to selected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Keith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Nov 2010 20:37:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83263#M1996</guid>
      <dc:creator>KeithGanzenmuller</dc:creator>
      <dc:date>2010-11-04T20:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83264#M1997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In your XAML, do you set FeatureDataGrid's Map and GraphicsLayer property? If you already have these two properties set by binding, you do not need code sections 1 &amp;amp; 2. Since in your QueryTask_ExecuteCompleted event handler, you already add the features to your GraphicsLayer. Since your Query's OutFields have values, I do not see why the FeatureDataGrid appears blank, you must've missed to set Map="{Binding ElementName=MyMap}" where MyMap is the name of your map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Nov 2010 05:28:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83264#M1997</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-11-05T05:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83265#M1998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm sure you are right Jennifer but for the life of me I can't figure out what I am doing wrong with the binding. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are some snapshots of my XAML as it sits right now, at the moment, I can select from the Parcels layer and the graphics will appear correctly in the map, nothing at all happens to the featuredatagrid though. In the code behind I commented out Code Sections 1 &amp;amp; 2. Is there something more to it then going to the Map Property, choosing Binding then Element Name = myMap then for Graphicslayer binding I chose Elementname as Parcels, which is the name defined in XAML for a Featurelayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esri:Map x:Name="myMap" IsLogoVisible="False" VerticalContentAlignment="Center"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esri:Map.Extent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esriGeometry:Envelope XMin="1396056" YMin="154236" XMax="1443794" YMax="206608"&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esriGeometry:Envelope.SpatialReference&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esriGeometry:SpatialReference WKID="3419" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esriGeometry:Envelope.SpatialReference&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esriGeometry:Envelope&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esri:Map.Extent&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="TiledAerial" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5:80/ArcGIS/rest/services/AerialPhotos/MapServer" rel="nofollow" target="_blank"&gt;http://sql2k5:80/ArcGIS/rest/services/AerialPhotos/MapServer&lt;/A&gt;&lt;SPAN&gt;" x:Name="Aerial" Visible="False" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:ArcGISDynamicMapServiceLayer ID="CityBasic" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5:80/ArcGIS/rest/services/CityBasic/MapServer" rel="nofollow" target="_blank"&gt;http://sql2k5:80/ArcGIS/rest/services/CityBasic/MapServer&lt;/A&gt;&lt;SPAN&gt;" x:Name="CityBasic"/&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:ArcGISDynamicMapServiceLayer ID="Violations" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5:80/ArcGIS/rest/services/Violations/MapServer" rel="nofollow" target="_blank"&gt;http://sql2k5:80/ArcGIS/rest/services/Violations/MapServer&lt;/A&gt;&lt;SPAN&gt;" x:Name="Violations" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:FeatureLayer x:Name="Parcels" ID="Parcels" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5/ArcGIS/rest/services/CityBasic/MapServer/8" rel="nofollow" target="_blank"&gt;http://sql2k5/ArcGIS/rest/services/CityBasic/MapServer/8&lt;/A&gt;&lt;SPAN&gt;" Mode="SelectionOnly" FeatureSymbol="{StaticResource SelectSymbol}" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt; &amp;lt;esri:ArcGISDynamicMapServiceLayer x:Name="CityInfoGroup" ID="CityInfoGroup" Url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sql2k5:80/arcgis/rest/services/CityInfoGroup/MapServer" rel="nofollow" target="_blank"&gt;http://sql2k5:80/arcgis/rest/services/CityInfoGroup/MapServer&lt;/A&gt;&lt;SPAN&gt;" Visible="False" /&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esri:Map&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;esriToolkit:FeatureDataGrid x:Name="featureGrid1" Map="{Binding ElementName=myMap}" GraphicsLayer="{Binding ElementName=Parcels}"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;!--&amp;lt;esriToolkit:FeatureDataGrid.Columns &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;slData:DataGridTextColumn CanUserSort="True" SortMemberPath="PARCEL" Binding="{Binding Attributes[PARCEL]}" Header="Parcel No." /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;slData:DataGridTextColumn CanUserSort="True" Binding="{Binding Attributes[PRPDNO]}" Header="Address" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;slData:DataGridTextColumn CanUserSort="True" Binding="{Binding Attributes[PRPDST]}" Header="Street" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;slData:DataGridTextColumn CanUserSort="True" Binding="{Binding Attributes[OWNERS]}" Header="Owners" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &amp;lt;/esriToolkit:FeatureDataGrid.Columns&amp;gt;--&amp;gt; &amp;lt;/esriToolkit:FeatureDataGrid&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 13:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83265#M1998</guid>
      <dc:creator>KeithGanzenmuller</dc:creator>
      <dc:date>2010-11-09T13:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83266#M1999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Keith,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your element binding to the GraphicsLayer property of the FeatureDataGrid should be as the following (your binding to Map property is correct):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
GraphicsLayer="{Binding Path=Layers[Parcels], ElementName=myMap}"
&lt;/PRE&gt;&lt;SPAN&gt;Also, FeatureDataGrid automatically populates columns for you unless you explicitly set its AutoGenerateColumns property to FALSE. I suggest do the above with the default behavior (AutoGenerateColumns = true) and see if it works then try to set your own column collections with their corresponding alias headers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:11:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83266#M1999</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2021-12-10T23:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83267#M2000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ali. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I commented out the row definitions and entered the binding you suggested but I get nothing in the featuredatagrid unless I have the following in code:&lt;/SPAN&gt;&lt;BR /&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; Dim resultFeaturesBinding As New Binding("LastResult.Features")&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; resultFeaturesBinding.Source = queryTask&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; featureGrid1.SetBinding(DataGrid.ItemsSourceProperty, resultFeaturesBinding)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I include those lines of code I get the features in the map and the rows in the featuredatagrid. I get columns for Geometry, Symbol, Attributes and a few others, including a column titled Selected with checkboxes which can't be checked. There is also no selection behavior in the grid, if I click a row it still shows 0 of 0. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously there is something wrong with what I am doing. Perhaps I should start over. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a tutorial which goes step by step through the featuredatagrid to graphics layer process, other than the interactive samples?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to you and Jennifer for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 15:08:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83267#M2000</guid>
      <dc:creator>KeithGanzenmuller</dc:creator>
      <dc:date>2010-11-09T15:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83268#M2001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The easiest way is to comment out what you have in your code-behind, then try and remove the "SelectionOnly" mode from your FeatureLayer (The default mode is "Snapshot"), i.e.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esri:FeatureLayer ID="Parcels" OutFields="*"&amp;nbsp; Url="http://sql2k5/ArcGIS/rest/services/CityBasic/MapServer/8"&amp;nbsp; FeatureSymbol="{StaticResource SelectSymbol}"&amp;nbsp;&amp;nbsp; /&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;[I guess you were also missing the "OutFields" property]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, use the following code for your FeatureDataGrid:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esriToolkit:FeatureDataGrid x:Name="featureGrid1" Map="{Binding&amp;nbsp; ElementName=myMap}" GraphicsLayer="{Binding Path=Layers[Parcels], ElementName=myMap}" /&amp;gt;
&lt;/PRE&gt;&lt;SPAN&gt;FeatureDataGrid should be populated by the features you have in your layer as it takes care of the CollectionChanged property of your layer's Graphics object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:11:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83268#M2001</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2021-12-10T23:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83269#M2002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok, so here is some weird behavior. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use the Mode="OnDemand" or "Snapshot" it takes forever and highlights the first 500 parcels and adds them to the datagrid, 500 being the maximum for 9.3.1. There are upwards of 20,000 parcels so it might not be possible to use anything but "Selection Only". The 500 parcels that are hightlighted on initialization do show up in the datagrid though. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I set it back to Selection Only in XAML. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now when I start up the map, I zoom in and select some parcels, the graphic outlines show up in the map and the feature grid is MOSTLY blank, I have Outfields="*" so it shows all the column headings and its shows the correct number of selected features, I can click in the grid and step through records, also I can zoom to the selected feature. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Only things is, no actual textual data shows up, except for in one single column out of a couple dozen. So I am clicking on rows but they are blank (except for the one column) even though they exhibit the correct behavior and number of records.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 19:33:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83269#M2002</guid>
      <dc:creator>KeithGanzenmuller</dc:creator>
      <dc:date>2010-11-09T19:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83270#M2003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since the FeatureLayer is SelectionOnly, at the application startup no features are displayed on the map, no rows are displayed on the FeatureDataGrid. Once a selection is made, in this sample I use the Editor Select command, features get added to the layer and the rows get populated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I could not replicate the issue with the following XAML-code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:esri="http://schemas.esri.com/arcgis/client/2009"&amp;gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;
&amp;nbsp; &amp;lt;Grid.Resources&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;esri:Editor x:Key="MyEditor" Map="{Binding ElementName=MyMap}" SelectionMode="Rectangle" /&amp;gt;
&amp;nbsp; &amp;lt;/Grid.Resources&amp;gt;
&amp;nbsp; &amp;lt;esri:Map x:Name="MyMap" Extent="-102.049995692435,&amp;nbsp; 36.995429186312, -94.6031396158311, 40.0025826914111"&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer ID="Tiled" Url="http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer ID="Parcel" Mode="SelectionOnly"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OutFields="*"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServer/0"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:FeatureLayer.Renderer&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:SimpleRenderer&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:SimpleFillSymbol Fill="Blue" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:SimpleRenderer&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/esri:FeatureLayer.Renderer&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/esri:FeatureLayer&amp;gt;
&amp;nbsp; &amp;lt;/esri:Map&amp;gt;
&amp;nbsp; &amp;lt;StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Center"&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;Button Content="Select" DataContext="{StaticResource MyEditor}" Command="{Binding Select}"/&amp;gt;
&amp;nbsp; &amp;lt;esri:FeatureDataGrid x:Name="MyFDG" Map="{Binding ElementName=MyMap}" GraphicsLayer="{Binding ElementName=MyMap, Path=Layers[Parcel]}"&amp;nbsp; Height="200"/&amp;gt;
&amp;nbsp; &amp;lt;/StackPanel&amp;gt;
 &amp;lt;/Grid&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you share some code? I'm using a layer from sampleserver1, which is still v9.31.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:11:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83270#M2003</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-10T23:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83271#M2004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, the way Jennifer presented above is querying against the same layer which might be different than your approach, i.e. using QueryTask. What is happening in your code I guess is that the Graphic instances returned by the FeatureSet's Feature collection are not the same as what you bounded to your datagrid and your layer still contains no graphic. I would definitely give Jennifer's code a try as the Editor control in her code is populating graphics in the layer and FeatureDataGrid respectively.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 21:12:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83271#M2004</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2010-11-09T21:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83272#M2005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks to both you, I appreciate all your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can definitely try the code in the morning, as well as send any of my code that you would like to see. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the meantime, any ideas why one single column would show values in an otherwise empty grid?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Keith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 21:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83272#M2005</guid>
      <dc:creator>KeithGanzenmuller</dc:creator>
      <dc:date>2010-11-09T21:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83273#M2006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The only thing that we can think of would be because of the "DisplayField" property of your layer. For example, the following layer has its "DisplayField" set to "description" and if your FeatureLayer's OutFields property has not been set then the "description" attribute would be the only column displayed in your datagrid:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"&gt;http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 22:06:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83273#M2006</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2010-11-09T22:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Binding Issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83274#M2007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I sort of have it working now, but not sure exactly why.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I put OutFields="*" in the XAML, I get the column headings and correct behavior (selection highlights the parcels, I can step through the features) but no attributes in the rows. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I put&amp;nbsp; query.OutFields.AddRange(New String() {"*"}) in the code, but don't but OutFields="*"&amp;nbsp; in XAML, I get nothing in the datagrid except it indicates the correct number of selected features. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I have both OutFields="*"&amp;nbsp; in XAML and query.OutFields.AddRange(New String() {"*"})&amp;nbsp; in code, I get all the fields, column headers and correct behavior. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, basically it works, just not sure why.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Nov 2010 14:18:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-binding-issue/m-p/83274#M2007</guid>
      <dc:creator>KeithGanzenmuller</dc:creator>
      <dc:date>2010-11-10T14:18:39Z</dc:date>
    </item>
  </channel>
</rss>

