<?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: Geodatabase Edits - Features deleted from attribute table but visible on map in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040082#M6375</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have you tried deleting without callback?&lt;/P&gt;&lt;P&gt;Just:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;                                    using (Feature row = (Feature)rowCursor.Current)
                                    {
                                        editOperationForPoints.Delete(row);
                                    }&lt;/LI-CODE&gt;&lt;P&gt;More info here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic9512.html" target="_self"&gt;https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic9512.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EditOperation ErrorMessage you can set which you want. If it is not set, you see default message.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;editOperationForPoints.ErrorMessage = "My error message";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Mar 2021 09:28:22 GMT</pubDate>
    <dc:creator>GKmieliauskas</dc:creator>
    <dc:date>2021-03-24T09:28:22Z</dc:date>
    <item>
      <title>Geodatabase Edits - Features deleted from attribute table but visible on map</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040052#M6374</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to delete features from filegeodatabase feature class. After executing edit operation, features get deleted from attribute table but&amp;nbsp; still appearing on Map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm referring following code snippet :&amp;nbsp;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#deleting-a-rowfeature" target="_blank" rel="noopener"&gt;https://github.com/esri/arcgis-pro-sdk/wiki/ProSnippets-Geodatabase#deleting-a-rowfeature&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here is my sample code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; await QueuedTask.Run(() =&amp;gt;
            {
                using (Geodatabase geodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(Project.Current.DefaultGeodatabasePath))))
                using (FeatureClass enterpriseTable = geodatabase.OpenDataset&amp;lt;FeatureClass&amp;gt;("PointFeature"))
                {
                    EditOperation editOperationForPoints = new EditOperation();
                    editOperationForPoints.Callback(context =&amp;gt;
                        {
                            QueryFilter deleteFilter = new QueryFilter { WhereClause = $"OBJECTID NOT IN (27)" };

                            using (RowCursor rowCursor = enterpriseTable.Search(deleteFilter, false))
                            {
                               
                                while (rowCursor.MoveNext())
                                {
                                    using (Feature row = (Feature)rowCursor.Current)
                                    {
                                        context.Invalidate(row);                                                                                                                 
                                        row.Delete();
                                    }
                                }
                            }


                        }, enterpriseTable);
                    try
                    {
                        deletionResult = editOperationForPoints.Execute();
                        if (!deletionResult) message = editOperationForPoints.ErrorMessage;//"Edit operation failed."
                    }
                    catch (GeodatabaseException exObj)
                    {
                        message = exObj.Message;
                    }
                }

            });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.Execute() returning true value but ErrorMessage says "Edit operation failed."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Prashant&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 06:55:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040052#M6374</guid>
      <dc:creator>PrashantKirpan</dc:creator>
      <dc:date>2021-03-24T06:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Geodatabase Edits - Features deleted from attribute table but visible on map</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040082#M6375</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have you tried deleting without callback?&lt;/P&gt;&lt;P&gt;Just:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;                                    using (Feature row = (Feature)rowCursor.Current)
                                    {
                                        editOperationForPoints.Delete(row);
                                    }&lt;/LI-CODE&gt;&lt;P&gt;More info here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic9512.html" target="_self"&gt;https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/#topic9512.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EditOperation ErrorMessage you can set which you want. If it is not set, you see default message.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;editOperationForPoints.ErrorMessage = "My error message";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 09:28:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040082#M6375</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2021-03-24T09:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Geodatabase Edits - Features deleted from attribute table but visible on map</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040493#M6381</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply. Called await Project.Current.SaveEditsAsync(); after success of edit operation and working fine. Working in both&amp;nbsp;callback and without callback&lt;/P&gt;&lt;P&gt;-Prashant&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 01:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040493#M6381</guid>
      <dc:creator>PrashantKirpan</dc:creator>
      <dc:date>2021-03-25T01:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Geodatabase Edits - Features deleted from attribute table but visible on map</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040672#M6383</link>
      <description>&lt;P&gt;With the callback you can also try invalidating the row both before (as you have) and after the delete call.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 16:50:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040672#M6383</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-25T16:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Geodatabase Edits - Features deleted from attribute table but visible on map</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040896#M6387</link>
      <description>&lt;P&gt;Hi SeanJones,&lt;/P&gt;&lt;P&gt;Yes, I tried that too. Even I tried to set null geometry, store feature and then delete but if I don't call save edits then issue persists.&lt;/P&gt;&lt;P&gt;-Prashant&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 00:00:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/geodatabase-edits-features-deleted-from-attribute/m-p/1040896#M6387</guid>
      <dc:creator>PrashantKirpan</dc:creator>
      <dc:date>2021-03-26T00:00:21Z</dc:date>
    </item>
  </channel>
</rss>

