<?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 Change what features are displayed during runtime in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30767#M800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Say that one is using the US_States layer. Initially, one would display all the states. Then, the user would like to only show states that begin with a certain string. For example, one wants the Where clause to be "STATE_NAME LIKE "NORTH%" to display only states that begin with NORTH in the name without displaying the other states. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcMap, this kind of problem is solved via a Query Definition. FeatureLayer's have a property called Where that serves the same function. Can one change a FeatureLayer's Where clause during runtime?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If not, how does one display only those features that meet certain attribute criteria? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Oct 2010 11:25:43 GMT</pubDate>
    <dc:creator>BrianPangtay</dc:creator>
    <dc:date>2010-10-06T11:25:43Z</dc:date>
    <item>
      <title>Change what features are displayed during runtime</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30767#M800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Say that one is using the US_States layer. Initially, one would display all the states. Then, the user would like to only show states that begin with a certain string. For example, one wants the Where clause to be "STATE_NAME LIKE "NORTH%" to display only states that begin with NORTH in the name without displaying the other states. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcMap, this kind of problem is solved via a Query Definition. FeatureLayer's have a property called Where that serves the same function. Can one change a FeatureLayer's Where clause during runtime?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If not, how does one display only those features that meet certain attribute criteria? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 11:25:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30767#M800</guid>
      <dc:creator>BrianPangtay</dc:creator>
      <dc:date>2010-10-06T11:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change what features are displayed during runtime</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30768#M801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi bpangtay,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, you can change the where clause of the FeatureLayer at runtime. All you have to do is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;FeatureLayer fLayer = Map.Layers["queryLayer"] as FeatureLayer;
string where = "STATE_NAME LIKE 'NORTH%'";
//set the where clause of the feature layer 
fLayer.Where = where;
fLayer.Update();
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And if you need to manipulate the Graphics on the layer after they have been updated, you can handle the UpdateCompleted event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good Luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:14:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30768#M801</guid>
      <dc:creator>DarinaTchountcheva</dc:creator>
      <dc:date>2021-12-10T21:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Change what features are displayed during runtime</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30769#M802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's exactly what I needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Oct 2010 13:43:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30769#M802</guid>
      <dc:creator>BrianPangtay</dc:creator>
      <dc:date>2010-10-06T13:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Change what features are displayed during runtime</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30770#M803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That sounds easy enough but what if you are dealing with thousands of features?&amp;nbsp; For example gas stations.&amp;nbsp; Initially, the query layer is off.&amp;nbsp; The user uses a "widget" to check a box to enable gas stations layer.&amp;nbsp; The user then chooses "Exxon" from a drop box of 10 gas stations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This would send "where name = exxon" to the server?&amp;nbsp; or does the server return all gas stations and the client side selects all Exxon stations from the full list?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the state example below, all states are first returned then the user updates the where clause.&amp;nbsp; FLayer.update() must call the service, right?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 15:48:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30770#M803</guid>
      <dc:creator>JasonThiel</dc:creator>
      <dc:date>2010-10-26T15:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Change what features are displayed during runtime</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30771#M804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jason, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To see what features you will get back and how Update works exactly, please go to the API reference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/api_start.htm"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/api_start.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Find the FeatureLayer in the Client assembly, and review its Mode property and Update method. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The FeatureLayer has also a Geometry property that you can use to apply a spatial filter and show only the Exxon gas stations in Texas, for example.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 16:20:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30771#M804</guid>
      <dc:creator>DarinaTchountcheva</dc:creator>
      <dc:date>2010-10-26T16:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Change what features are displayed during runtime</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30772#M805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yikes!&amp;nbsp; I didn't realize this was silverlight.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does Flex work similarly?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My gas station example illustrates what I need to do for about 5 different feature layers.&amp;nbsp; I've search desktop client documents, arc server docs, and esri flex area but can't seem to locate anything that really talks about "user defined criteria" to a query layer.&amp;nbsp; Am i missing something obvious?&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>Tue, 26 Oct 2010 16:46:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30772#M805</guid>
      <dc:creator>JasonThiel</dc:creator>
      <dc:date>2010-10-26T16:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Change what features are displayed during runtime</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30773#M806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;LOL&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Flex API works similarly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the link to the Flex resourses:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/index.html"&gt;http://help.arcgis.com/en/webapi/flex/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would recommend downloading the Flex Viewer in the Quick Links on the right site of the page. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It has configuration files that you can configure to fit your data, and you don't have to do any programming. There are also a lot of custom widgets created by the community and I am pretty sure there is an Attribute Query widget you can use, if it is not built in the viewer already. Sorry, I haven't played with the viewer for a while.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good Luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2010 17:13:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/change-what-features-are-displayed-during-runtime/m-p/30773#M806</guid>
      <dc:creator>DarinaTchountcheva</dc:creator>
      <dc:date>2010-10-26T17:13:32Z</dc:date>
    </item>
  </channel>
</rss>

