I'm using the method new FeatureLayerCreationParams(new Uri(XXX)) to add layers from SDE to the map. How can I set the added layers as read-only and uneditable?
Solved! Go to Solution.
Hi,
Here is a code snippet that sets a FeatureLayer to be uneditable.
QueuedTask.Run(() =>
{
var cimFeatureLayer = layer.GetDefinition() as CIMFeatureLayer;
var featureTable = cimFeatureLayer.FeatureTable;
featureTable.Editable = false;
cimFeatureLayer.FeatureTable = featureTable;
layer.SetDefinition(cimFeatureLayer);
});
Hi,
Here is a code snippet that sets a FeatureLayer to be uneditable.
QueuedTask.Run(() =>
{
var cimFeatureLayer = layer.GetDefinition() as CIMFeatureLayer;
var featureTable = cimFeatureLayer.FeatureTable;
featureTable.Editable = false;
cimFeatureLayer.FeatureTable = featureTable;
layer.SetDefinition(cimFeatureLayer);
});
Thank you so much.