Select to view content in your preferred language

Featurelayer is not getting updated after deleting feature from it.

677
4
05-02-2011 02:24 AM
SanajyJadhav
Deactivated User
Hi,

I am stuck one issue regarding Editor Widget and feature layer update. My feature layer is not getting updated after deleting features from it.

I have Editor Widget in the application and other tasks like attribute query, Identify etc. Below mentioned is my workflow in which I found the issue.

1. I add a new feature using feature template and I save changes to database. It works fine. Feature is added to SDE feature class.
2. I use my attribute query tool to find the newly added feature and it is found.
3. I delete the feature using Editor Widget. It gets deleted. It disappears from the map.I check in ArcMap and feature is deleted.
4. Again, I use my attribute query to find the deleted feature and surprisingly it is found. I cannot see the feature on the map, but my query finds that feature though it is deleted.

I have set DisableClientCaching property of the feature layer to true. So, once feature is deleted, it should not reside in cache. But, in my case, the deleted feature is again being pulled off from somewhere. II cannot see the feature normally, but if I fire any query on it, it is found.If I close the browser and restart the apps, I cannot find that feature using attribute query.

I subscribed to FeatureLayer_EndSaveEdits and I updated and refreshed the feature layer, but of no use. I updated the feature layer on ???Search??? button of attribute query, but no luck. This is really driving me crazy.

I would really appreciate if somebody help me out fix this issue.

Regards,
Sanjay.
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
Did you set DisableClientCaching to true for your attribute query as well?
0 Kudos
SanajyJadhav
Deactivated User
Thanks Dom.

I set that property on the QueryTask and it fixed the issue.To be very frank, I never thought this property would ever exist on QueryTask class and so kept wandering around the FeatureLayer only.

Thanks once again for giving the right and prompt solution. I appreciate your help.

-
Sanjay.
0 Kudos
KeithAnderson
Occasional Contributor
Same for me.

Emulated sample in Silverlight API (Edit Tools Explicit Save).

Everything works but a deleted Poly keep coming up on Initial Extent.
If you zoom In/out a level it dissapears but comes back in at initial extent.
The object is deleted.
Cleared admin cache. No luck
Ctrl-F5 No luck

Any advice appreciated.

Ketih
0 Kudos
JenniferNery
Esri Regular Contributor
It looks like Sanjay was able to fix the issue by setting DisableClientCaching to true on QueryTask. But in your case, the deleted feature remains visible on the map at the initial extent? You are using the same app to delete and view the layer, right? I do not see that happening in this SDK sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsExplicitSave.
0 Kudos