Select to view content in your preferred language

What is the difference between CanEditData() and IsEditable?

230
2
02-26-2024 06:48 AM
Amadeus111
Occasional Contributor II

I need to check if a FeatureLayer editable and convey a message to the user if editing fails for a feature. I would like to show a meaningful reason why the FeatureLayer is not editable. 

I thought CanEditData() returns false for only if user unchecks editable checkbox on Contents pane but that is not I found out. So, what is the difference between these two other than one is method, the other is property? They basically check the same thing? 

 

2 Replies
LukeBettis
New Contributor

I would also like to know the answer to this, I have a feature layer with IsEditable true and CanEditData() returning false. What's the difference between the two?

0 Kudos
GKmieliauskas
Esri Regular Contributor

Hi,

Text from ProConcepts:

"Edits can be attempted on all editable layers and standalone tables, i.e. MapMembers, determined by the CanEditData property on BasicFeatureLayer, StandAloneTable and IDisplayTable. This property is a combination of the editability of the data source (read/write), and the IsEditable property of those classes which represents the check box state on the List by Editing view of the table of contents."

ProConcepts Editing · Esri/arcgis-pro-sdk Wiki · GitHub

 

 

 
0 Kudos