How to Unsubscribe RowChangeEvent from multiple layers?

341
2
Jump to solution
06-17-2022 05:57 AM
MohammedHilal_K
New Contributor III

Hi,

We can subscribe the RowChangedEvent for all the layers by looping  through FeatureLayers in the Map. But I need to Unsubscribe the RowChangeEvent after the first event from all the layers. I could done with a single layer, but If I'm subscribing multiple layers, I can't unsubscribe by RowChangedEvent.Unsubscripe(_rowChangeToken). Any suggestions? 

0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi ,

You need to save all event subscription tokens to list first, then unsubscribe one by one from list. There is ArcGIS Pro SDK community sample EditEvents . You can find usable code here.

View solution in original post

2 Replies
GKmieliauskas
Esri Regular Contributor

Hi ,

You need to save all event subscription tokens to list first, then unsubscribe one by one from list. There is ArcGIS Pro SDK community sample EditEvents . You can find usable code here.

MohammedHilal_K
New Contributor III

It got resolved.  Thanks you @GKmieliauskas 

0 Kudos