<?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: Feature Layer query after editing in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/feature-layer-query-after-editing/m-p/457374#M11817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jennifer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Setting DisableClientCaching to true solved the problem.&amp;nbsp; I'm not getting the correct updated values for my query.&amp;nbsp; Thank you for the solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Will&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Mar 2011 12:01:54 GMT</pubDate>
    <dc:creator>WilliamKimrey</dc:creator>
    <dc:date>2011-03-01T12:01:54Z</dc:date>
    <item>
      <title>Feature Layer query after editing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/feature-layer-query-after-editing/m-p/457371#M11814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After I perform an edit on a&amp;nbsp; FeatureLayer, when I query the feature I just edited, the query results return the old value.&amp;nbsp; This doesn't happen when I add a new feature, only when I edit an existing feature.&amp;nbsp; Any reason why this is or ideas on how to get the new updated values?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Will&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Feb 2011 18:26:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/feature-layer-query-after-editing/m-p/457371#M11814</guid>
      <dc:creator>WilliamKimrey</dc:creator>
      <dc:date>2011-02-28T18:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer query after editing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/feature-layer-query-after-editing/m-p/457372#M11815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I should probably clarify that the QueryTask I'm using is on the MapService while the editing is on the FeatureService for the same published MXD.&amp;nbsp; I get the feeling that this is where the disconnect lies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Will&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Feb 2011 20:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/feature-layer-query-after-editing/m-p/457372#M11815</guid>
      <dc:creator>WilliamKimrey</dc:creator>
      <dc:date>2011-02-28T20:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer query after editing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/feature-layer-query-after-editing/m-p/457373#M11816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried to replicate the issue by performing an attribute value change on feature service and performing a query on its corresponding map service after the edit was submitted to the server. I was able to see the updated attribute value when my QueryTask ExecuteCompleted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the following code where my FeatureLayer is AutoSave=True so I did not need to call SaveEdits() explicitly. I also subscribed to EndSaveEdits and SaveEditsFailed to make sure that the edit was submitted to the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void Query_Click(object sender, RoutedEventArgs e)
{
 Query q = new Query()
 {
&amp;nbsp; OutFields = new OutFields() { "*" },
&amp;nbsp; ObjectIDs = new int[] { 78597 },
 };&amp;nbsp;&amp;nbsp;&amp;nbsp; 
 QueryTask qt = new QueryTask("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer/2");
 qt.DisableClientCaching = true;
 qt.ExecuteCompleted += new EventHandler&amp;lt;QueryEventArgs&amp;gt;(qt_ExecuteCompleted);
 qt.ExecuteAsync(q);
}

void qt_ExecuteCompleted(object sender, QueryEventArgs e)
{
 foreach (var f in e.FeatureSet.Features)
&amp;nbsp; System.Diagnostics.Debug.WriteLine(f.Attributes["description"]);
}

private void FeatureLayer_MouseLeftButtonDown(object sender, GraphicMouseButtonEventArgs e)
{
 //78597
 e.Graphic.Attributes["description"] = "this is a test";
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If SaveEditsFailed event did not get raised and the edit was submitted successfully, maybe you just need to set DisableClientCaching to true on QueryTask &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.TaskBase~DisableClientCaching.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.TaskBase~DisableClientCaching.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:21:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/feature-layer-query-after-editing/m-p/457373#M11816</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T20:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer query after editing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/feature-layer-query-after-editing/m-p/457374#M11817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jennifer,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Setting DisableClientCaching to true solved the problem.&amp;nbsp; I'm not getting the correct updated values for my query.&amp;nbsp; Thank you for the solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Will&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 12:01:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/feature-layer-query-after-editing/m-p/457374#M11817</guid>
      <dc:creator>WilliamKimrey</dc:creator>
      <dc:date>2011-03-01T12:01:54Z</dc:date>
    </item>
  </channel>
</rss>

