<?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: TableControl does not return selected row in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1100456#M7162</link>
    <description>&lt;P&gt;Hi Thomas,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you tell me what version of ArcGIS and the Pro SDK you are using?&lt;/P&gt;&lt;P&gt;Also what type of data you are displaying in the table.&amp;nbsp; Is it file gdb, SDE data, feature service data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The xaml error that you are getting&amp;nbsp;&lt;SPAN&gt;"TableControl" does not exist in the namespace "clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing".&amp;nbsp; &amp;nbsp;is something that you can ignore.&amp;nbsp; As you are aware you can compile and run your project despite this error message.&amp;nbsp;&amp;nbsp;The messages are coming from the 'XAML Designer' and if you close all XAML windows and rebuild you shouldn't get any messages.&amp;nbsp;&amp;nbsp;In 2.8 all Pro assemblies were switched from mixed (x86 and x64) to 64 bit only. Unfortunately the XAML designer loader cannot load x64 bit assemblies.&amp;nbsp; &amp;nbsp;Hopefully the upcoming release of Visual Studio 2022 will fix this issue.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With regards to the other problems, I am not seeing any issues with the GetSelectedRowIndexes or&amp;nbsp;GetSeletedObjectIds methods in my test (I am using file gdb data),&amp;nbsp; Knowing which release and what type of data you are using will allow me to help track it down further.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also when checking the properties of the tableControl is your breakpoint on the UI thread or the background thread?&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Narelle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Sep 2021 17:12:47 GMT</pubDate>
    <dc:creator>NarelleChedzey</dc:creator>
    <dc:date>2021-09-21T17:12:47Z</dc:date>
    <item>
      <title>TableControl does not return selected row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1100214#M7156</link>
      <description>&lt;P&gt;In my addin I visualize the attribute values of a feature layer in a TableControl. Until recently the whole setup worked fine, and for whatever reason does the addin not work any more correct. I can show the attribute values of the feature layer, but when I try to retrieve the selected row in the TableControl then nothing comes back.&lt;/P&gt;&lt;P&gt;To utilize the TableControl I define the namespace in the xaml file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;xmlns:editing="clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and add the control:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;editing:TableControl Grid.Row="2" x:Name="tableControl"
                                      AutomationProperties.AutomationId="_tableControl"
                                      HorizontalAlignment="Stretch"
                                      TableContent="{Binding Path=TableContent}"
                                      MinHeight="450"
                                      MaxHeight="500"
                                      RowContextMenu="{StaticResource StepperRowContextMenu}"
                                      SelectedRowContextMenu="{StaticResource StepperRowContextMenu}"
                                      ColumnContextMenu="{StaticResource StepperColumnContextMenu}"&amp;gt;
    &amp;lt;i:Interaction.Triggers&amp;gt;
        &amp;lt;i:EventTrigger EventName="MouseDoubleClick"&amp;gt;
            &amp;lt;i:InvokeCommandAction Command="{Binding ZoomItemCommand}"/&amp;gt;
        &amp;lt;/i:EventTrigger&amp;gt;
        &amp;lt;i:EventTrigger EventName="SelectedRowsChanged"&amp;gt;
            &amp;lt;i:InvokeCommandAction Command="{Binding GetSelectedRowCommand}"/&amp;gt;
        &amp;lt;/i:EventTrigger&amp;gt;
    &amp;lt;/i:Interaction.Triggers&amp;gt;
&amp;lt;/editing:TableControl&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting an XDG0008 error from the component, saying the name "TableControl" does not exist in the namespace "clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing".&lt;/P&gt;&lt;P&gt;Even though it is claimed the component does not exist within the namespace, the component is shown in the addin, populated with data, and then when I change the selected row nothing happens. Every time the selected row is changed I ask the TableControl to return the selected row indexes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public async Task SelectedRowForStepper()
        {
            IReadOnlyList&amp;lt;long&amp;gt; curSelectedRowList = await QueuedTask.Run(() =&amp;gt; _tableControl.GetSeletedRowIndexes());
            
            if (curSelectedRowList.Any())
            {
            	...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here, _tableControl is of type TableControl and its content was created through TableControlContentFactory.Create(workLayer), where worklayer is of type MapMember.&lt;BR /&gt;The resulting content object contains the correct value in its MapMember property. However, when running _tableControl.GetSeletedObjectIds() as List&amp;lt;long&amp;gt;) the list has a count of zero.&lt;BR /&gt;When I look at _tableControl at the point when one of the rows is selected, then _tableControl has the following property values:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;TableContent: null&lt;/LI&gt;&lt;LI&gt;RowCount: -1&lt;/LI&gt;&lt;LI&gt;ActiveFieldIndex: null&lt;/LI&gt;&lt;LI&gt;ActiveRowIndex: -1&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;How can it be, that I do get these values, even though the table is populated with correct data, the control itself counts 234 items/rows in it, and when I select one or more rows the count of selected rows is shown correctly in the bottom of the control as e.g. "1 of 234"?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 13:57:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1100214#M7156</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2021-09-21T13:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: TableControl does not return selected row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1100456#M7162</link>
      <description>&lt;P&gt;Hi Thomas,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you tell me what version of ArcGIS and the Pro SDK you are using?&lt;/P&gt;&lt;P&gt;Also what type of data you are displaying in the table.&amp;nbsp; Is it file gdb, SDE data, feature service data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The xaml error that you are getting&amp;nbsp;&lt;SPAN&gt;"TableControl" does not exist in the namespace "clr-namespace:ArcGIS.Desktop.Editing;assembly=ArcGIS.Desktop.Editing".&amp;nbsp; &amp;nbsp;is something that you can ignore.&amp;nbsp; As you are aware you can compile and run your project despite this error message.&amp;nbsp;&amp;nbsp;The messages are coming from the 'XAML Designer' and if you close all XAML windows and rebuild you shouldn't get any messages.&amp;nbsp;&amp;nbsp;In 2.8 all Pro assemblies were switched from mixed (x86 and x64) to 64 bit only. Unfortunately the XAML designer loader cannot load x64 bit assemblies.&amp;nbsp; &amp;nbsp;Hopefully the upcoming release of Visual Studio 2022 will fix this issue.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With regards to the other problems, I am not seeing any issues with the GetSelectedRowIndexes or&amp;nbsp;GetSeletedObjectIds methods in my test (I am using file gdb data),&amp;nbsp; Knowing which release and what type of data you are using will allow me to help track it down further.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also when checking the properties of the tableControl is your breakpoint on the UI thread or the background thread?&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Narelle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 17:12:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1100456#M7162</guid>
      <dc:creator>NarelleChedzey</dc:creator>
      <dc:date>2021-09-21T17:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: TableControl does not return selected row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1100759#M7165</link>
      <description>&lt;P&gt;Hi Narelle,&lt;/P&gt;&lt;P&gt;thanks for your fast reply.&lt;/P&gt;&lt;P&gt;We are running ArcGIS Pro version: 2.8.1 and the addin is currently build with ArcGIS Pro SDK version: 2.8.0.29751.&lt;/P&gt;&lt;P&gt;With respect to the data source, I display QueryLayer, data request goes to an Oracle database.&lt;/P&gt;&lt;P&gt;The breakpoint is directly on line 3 in the SelectedRowForStepper method. Hence, I believe I am looking at the TableControl object that should hold the information visualized in the UI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for looking deeper into things.&lt;/P&gt;&lt;P&gt;Bests Thomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 12:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1100759#M7165</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2021-09-22T12:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: TableControl does not return selected row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1101076#M7171</link>
      <description>&lt;P&gt;Hi Thomas,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anything else you can tell me about the queryLayer that you have.&amp;nbsp; Are you displaying the entire data from the Oracle feature class or does the query layer have a where clause so that only a subset of data is displayed.&amp;nbsp; Do you happen to know what version of Oracle is being used?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have connected to an Oracle database and loaded a querylayer with a point feature class.&amp;nbsp; I have tested on a 2.8.1 build of ArcGIS Pro and am not seeing any problems with the TableControl or it's properties.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your original post you mention "&lt;SPAN&gt;Until recently the whole setup worked fine, and for whatever reason does the addin not work any more correct."&amp;nbsp; &amp;nbsp; &amp;nbsp;Did you perform any software upgrades in the timeframe that you noticed it stopped working.&amp;nbsp; Or made additional changes to the add-in?&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Finally, would you be able to share your entire visual studio project with me.&amp;nbsp; That might help me find the problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Narelle&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 23:43:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1101076#M7171</guid>
      <dc:creator>NarelleChedzey</dc:creator>
      <dc:date>2021-09-22T23:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: TableControl does not return selected row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1101147#M7175</link>
      <description>&lt;P&gt;Hi Narelle,&lt;/P&gt;&lt;P&gt;about the QueryLayer, I do not display the entire data of the oracle table, but have a where clause in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT * FROM SCHEMA1.TABLE1 WHERE FEATURETYPE = 'turbine' AND EXISTS (SELECT 1 FROM SCHEMA2.TABLE2 v WHERE v.LOCALID = TO_CHAR(OTLOCALID) AND TRUNC(v.REGISTRATIONFROM, 'MI') = TRUNC(TO_TIMESTAMP_TZ(TO_CHAR(FROM_TZ(CAST(OTREGISTRETIONFROM AS TIMESTAMP), 'Europe/Copenhagen'),'YYYY-MM-DD HH24:MI:SS,ff6 TZH:TZM'),'YYYY-MM-DD HH24:MI:SS,ff6 TZH:TZM'), 'MI')) ORDER BY OBJECTID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set the unique identifier through&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;queryDescription.SetObjectIDFields("OBJECTID");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Our current version of Oracle is Oracle Database 18c EE Extreme Perf Release 18.0.0.0.0 - Production&lt;BR /&gt;Version 18.10.0.0.0&amp;nbsp;&lt;/P&gt;&lt;P&gt;and yes, we had changes in our infrastructure. I only touched the add-in because the location of the Oracle server changed in connection with an upgrade from version 12.1.0.1.0, and since then the add-in goes haywire.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 08:56:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/tablecontrol-does-not-return-selected-row/m-p/1101147#M7175</guid>
      <dc:creator>TomGeo</dc:creator>
      <dc:date>2021-09-23T08:56:45Z</dc:date>
    </item>
  </channel>
</rss>

