<?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: Selection in FeatureDataGrid in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190729#M4726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt; i have a question concerning the selection of a FeatureDataGrids or FeatureLayers.&lt;BR /&gt;In my Application i have a FeatureLayer and a FeatureDataGrid. If i select a row in the datagrid the feature in the map is selected and vise versa. Now i would like to select a Feature via CodeBehind. Is that possible? &lt;BR /&gt;&lt;BR /&gt;For example i would like to select the feature by specific Attributes.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you can select a feature via code behind using Graphic.Select() method or Graphic.Selected property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example, you can select some existing features from a FeatureLayer using somthing like the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;List&amp;lt;Graphic&amp;gt; filteredGraphics = featureLayer.Graphics.Where(g =&amp;gt; Convert.ToString(g.Attributes["AttributeKey"]) == "AttributeValue").ToList();
 foreach (Graphic g in filteredGraphics)
 {
&amp;nbsp;&amp;nbsp;&amp;nbsp; g.Select();
 }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 09:36:01 GMT</pubDate>
    <dc:creator>AhmedEl-Sisi</dc:creator>
    <dc:date>2021-12-11T09:36:01Z</dc:date>
    <item>
      <title>Selection in FeatureDataGrid</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190728#M4725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; i have a question concerning the selection of a FeatureDataGrids or FeatureLayers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In my Application i have a FeatureLayer and a FeatureDataGrid. If i select a row in the datagrid the feature in the map is selected and vise versa. Now i would like to select a Feature via CodeBehind. Is that possible? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example i would like to select the feature by specific Attributes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in Advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Mar 2014 11:08:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190728#M4725</guid>
      <dc:creator>UlfGrimhardt</dc:creator>
      <dc:date>2014-03-28T11:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Selection in FeatureDataGrid</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190729#M4726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt; i have a question concerning the selection of a FeatureDataGrids or FeatureLayers.&lt;BR /&gt;In my Application i have a FeatureLayer and a FeatureDataGrid. If i select a row in the datagrid the feature in the map is selected and vise versa. Now i would like to select a Feature via CodeBehind. Is that possible? &lt;BR /&gt;&lt;BR /&gt;For example i would like to select the feature by specific Attributes.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you can select a feature via code behind using Graphic.Select() method or Graphic.Selected property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example, you can select some existing features from a FeatureLayer using somthing like the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;List&amp;lt;Graphic&amp;gt; filteredGraphics = featureLayer.Graphics.Where(g =&amp;gt; Convert.ToString(g.Attributes["AttributeKey"]) == "AttributeValue").ToList();
 foreach (Graphic g in filteredGraphics)
 {
&amp;nbsp;&amp;nbsp;&amp;nbsp; g.Select();
 }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:36:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190729#M4726</guid>
      <dc:creator>AhmedEl-Sisi</dc:creator>
      <dc:date>2021-12-11T09:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Selection in FeatureDataGrid</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190730#M4727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok thank you for the help. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That works great if i set the FeatureLayer Mode to "OnDemand" or "Snapshot", but if i set it so SelectionOnly no Feature is shown.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The filteredGraphics List in your Code doesnt contains any Features so no Feautre is found.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be great if i could select a feature by code from the layer and just the features that fulfill the where-clause are shown in the DataGrid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any Ideas concerning that problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in Advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ulf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 11:58:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190730#M4727</guid>
      <dc:creator>UlfGrimhardt</dc:creator>
      <dc:date>2014-04-09T11:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Selection in FeatureDataGrid</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190731#M4728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Ok thank you for the help. &lt;BR /&gt;That works great if i set the FeatureLayer Mode to "OnDemand" or "Snapshot", but if i set it so SelectionOnly no Feature is shown.&lt;BR /&gt;The filteredGraphics List in your Code doesnt contains any Features so no Feautre is found.&lt;BR /&gt;&lt;BR /&gt;It would be great if i could select a feature by code from the layer and just the features that fulfill the where-clause are shown in the DataGrid.&lt;BR /&gt;&lt;BR /&gt;Do you have any Ideas concerning that problem?&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance&lt;BR /&gt;&lt;BR /&gt;Ulf&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Use FeatureLayer.WhereClause to filter your features and remove SelectionOnly Mode.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 05:16:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190731#M4728</guid>
      <dc:creator>AhmedEl-Sisi</dc:creator>
      <dc:date>2014-04-10T05:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Selection in FeatureDataGrid</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190732#M4729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the Info! That helped to solve my Problem!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 12:39:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/selection-in-featuredatagrid/m-p/190732#M4729</guid>
      <dc:creator>UlfGrimhardt</dc:creator>
      <dc:date>2014-04-14T12:39:24Z</dc:date>
    </item>
  </channel>
</rss>

