ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Editing.Events Namespace / RowCreatedEvent Class / Subscribe Method
The delegate that gets executed when the event is published.
The table to listen to.
(optional) The type of reference used to maintain the delegate. false is a weak reference, true is a strong reference. (default value = false)
Example

In This Topic
    Subscribe Method (RowCreatedEvent)
    In This Topic
    Subscribes to RowCreatedEvents that are published when a row is created. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    action
    The delegate that gets executed when the event is published.
    table
    The table to listen to.
    keepSubscriberAlive
    (optional) The type of reference used to maintain the delegate. false is a weak reference, true is a strong reference. (default value = false)

    Return Value

    A token that uniquely identifies the subscription.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Subscribe to Row Events
    protected void SubscribeRowEvent()
    {
      QueuedTask.Run(() =>
      {
        //Listen for row events on a layer
        var featLayer = MapView.Active.GetSelectedLayers().First() as FeatureLayer;
        var layerTable = featLayer.GetTable();
    
        //subscribe to row events
        var rowCreateToken = RowCreatedEvent.Subscribe(OnRowCreated, layerTable);
        var rowChangeToken = RowChangedEvent.Subscribe(OnRowChanged, layerTable);
        var rowDeleteToken = RowDeletedEvent.Subscribe(OnRowDeleted, layerTable);
      });
    }
    
    protected void OnRowCreated(RowChangedEventArgs args)
    {
    }
    
    protected void OnRowChanged(RowChangedEventArgs args)
    {
    }
    
    protected void OnRowDeleted(RowChangedEventArgs args)
    {
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also