AnsweredAssumed Answered

How can I change properly the DataSource of a featurelayer?

Question asked by mario.damico on Dec 18, 2018

I have followed this example:

arcgis-pro-sdk-community-samples/ChangeLayerDataSource.cs at master · Esri/arcgis-pro-sdk-community-samples · GitHub 

but, in my opinion, it doesn't work properly.

I have two featureclass in the same GDB, and a layer on the map has source GDB\featureclass1. I change the DataSource of the layer using the code in the example so that the new DataSource is GDB\featureclass2.

When I delete GDB\featureclass1 the layer is removed from the map, I'm wandering why this is happening because now its DataSource is changed.

Any suggestion?

Outcomes