ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Editing.Events Namespace / RowDeletedEvent 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 (RowDeletedEvent)
    In This Topic
    Subscribes to RowDeletedEvents that are published when a row is deleted. 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.
    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, Windows 8.1

    See Also