ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MappingExtensions Class / CanEditData Method

In This Topic
    CanEditData Method (MappingExtensions)
    In This Topic
    Checks if the data represented by the map member can be edited. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Shared Function CanEditData( _
       ByVal mapMember As MapMember _
    ) As Boolean
    public static bool CanEditData( 
       MapMember mapMember
    )

    Parameters

    mapMember
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    This method is different from BasicFeatureLayer.IsEditable which incorporates the state of the Editable checkbox on the TOC for the layer

    A value of true returned from this function does not guarantee that an edit on this layer will succeed. The checks performed by this method are attempted without executing an actual edit, so there may be other additional factors which can impact if the data can be edited successfully.

    The checks performed include testing the layer type, if the data is part of a compressed geodatabase, if connected to an enterprise dataset with edit permissions.

    The checks do not include tests for file permissions - such as a shapefile being readonly on disk.Returns true if data can be edited.

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.7 or higher.
    See Also