<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: onRowChangedEvents triggering for different edit session in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowchangedevents-triggering-for-different-edit/m-p/826711#M3076</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Question1: Yes you can&amp;nbsp;implement multiple row events throughout a project but you also have to maintain the lifetime of each. i.e when to subscribe/unsubscribe for your workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question2: I cant evaluate your approach without seeing the whole code (probably not practical) or at least a sample project illustrating the problem but it&amp;nbsp;should work....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code above you'll want to set&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;_rowChangedToken to null after the unsubscribe, otherwise it wont resubscribe if the variable is still in scope.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Check the spelling of your row subscription events, as more than once ive subscribed to the wrong event because they're similarly named.&lt;/P&gt;&lt;P&gt;There are a few rowevent samples in the &lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples"&gt;community samples&lt;/A&gt; repo but probably none that have them in multiple modules.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2020 18:53:28 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-01-29T18:53:28Z</dc:date>
    <item>
      <title>onRowChangedEvents triggering for different edit session</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowchangedevents-triggering-for-different-edit/m-p/826710#M3075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Currently we are having multiple edit modules in the project.&lt;/P&gt;&lt;P&gt;For example, EditModule1 --&amp;gt; will perform Split functionality on FeatureClass1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EditModule2 --&amp;gt; will perform Extent functionality &lt;SPAN&gt;on FeatureClass2&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;In both the scenarios - we need to observe the feature classes changes. So, we have implemented onRowChangedEvent on featureclass1 with business logic1.&lt;/P&gt;&lt;P&gt;onRowCreatedEvent got implemented on featureclass2 with business logic2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is - whenever there is a change in featureclasse 2 , onRowChangedEvent is getting triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have unsubscribed this event after completion of Edit session1. But no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the sample code snippet below.&lt;/P&gt;&lt;P&gt;//Creating the Edit Operation&lt;BR /&gt; await QueuedTask.Run(() =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ActiveMapView.SelectFeatures(geometry);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var editOp = new EditOperation();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;editOp.Name = "Edit Module1";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;editOp.SelectModifiedFeatures = true;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;editOp.SelectNewFeatures = true;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (_rowChangedToken == null)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_rowChangedToken = ArcGIS.Desktop.Editing.Events.RowChangedEvent.Subscribe(onRowChangedEvent, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;featureLayer.GetTable());&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;//some&amp;nbsp;extra lines of code&amp;nbsp;to call split functionality.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//Execute the Edit Operation&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;editOp.Execute();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ArcGIS.Desktop.Editing.Events.RowChangedEvent.Unsubscribe(_rowChangedToken);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 1: if i am not wrong, we can implement multiple Row Events on single project. But we have to unsubscribe the events (in each module wise) properly. Please correct me - if this is not the scenario.&lt;/P&gt;&lt;P&gt;2. Please correct me what is the mistake in my approach and why this event is getting triggered from other edit modules.&lt;/P&gt;&lt;P&gt;Is there any good example i can refer to understand this completely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2020 13:04:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowchangedevents-triggering-for-different-edit/m-p/826710#M3075</guid>
      <dc:creator>SreenivasaRaoPigili</dc:creator>
      <dc:date>2020-01-29T13:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: onRowChangedEvents triggering for different edit session</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowchangedevents-triggering-for-different-edit/m-p/826711#M3076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;Question1: Yes you can&amp;nbsp;implement multiple row events throughout a project but you also have to maintain the lifetime of each. i.e when to subscribe/unsubscribe for your workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question2: I cant evaluate your approach without seeing the whole code (probably not practical) or at least a sample project illustrating the problem but it&amp;nbsp;should work....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your code above you'll want to set&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;_rowChangedToken to null after the unsubscribe, otherwise it wont resubscribe if the variable is still in scope.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Check the spelling of your row subscription events, as more than once ive subscribed to the wrong event because they're similarly named.&lt;/P&gt;&lt;P&gt;There are a few rowevent samples in the &lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples"&gt;community samples&lt;/A&gt; repo but probably none that have them in multiple modules.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2020 18:53:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowchangedevents-triggering-for-different-edit/m-p/826711#M3076</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-01-29T18:53:28Z</dc:date>
    </item>
  </channel>
</rss>

