ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Editing.Events Namespace / RowChangedEvent Class / Subscribe Method
A delegate that is executed when a RowChangedEvent 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 (RowChangedEvent)
    In This Topic
    Subscribes to RowChangedEvents that are published when a row changes. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    action
    A delegate that is executed when a RowChangedEvent 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