<?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: ITableSelection in a map document in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/itableselection-in-a-map-document/m-p/707370#M18927</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A null queryfilter did work.&amp;nbsp; So, I went ahead and checked the format of my where clauses and magically it started working.&amp;nbsp; Weird.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Dec 2013 11:21:35 GMT</pubDate>
    <dc:creator>JohnStephens</dc:creator>
    <dc:date>2013-12-04T11:21:35Z</dc:date>
    <item>
      <title>ITableSelection in a map document</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itableselection-in-a-map-document/m-p/707368#M18925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an add-in tool for arcmap that is basically a customized selection tool.&amp;nbsp; I have it working just fine for feature class selections, but I cannot seem to get it to show the Table selections in the map document.&amp;nbsp; This is the method I have for the table selections:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
private void SelectTableFeaturesByAttributeQuery(IStandaloneTable standAloneTable, string whereClause, bool addToSelection)
{
&amp;nbsp;&amp;nbsp; // a selection cannot be done if any of these are empty
&amp;nbsp;&amp;nbsp; if (activeView == null || standAloneTable == null || whereClause == null) return;

&amp;nbsp;&amp;nbsp; ITableSelection tableSelection = (ITableSelection)standAloneTable;

&amp;nbsp;&amp;nbsp; // Set up the query
&amp;nbsp;&amp;nbsp; IQueryFilter queryFilter = new QueryFilterClass();
&amp;nbsp;&amp;nbsp; queryFilter.WhereClause = whereClause;

&amp;nbsp;&amp;nbsp; // Perform the selection
&amp;nbsp;&amp;nbsp; try
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (addToSelection)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableSelection.SelectRows(queryFilter, esriSelectionResultEnum.esriSelectionResultAdd, false);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tableSelection.SelectRows(queryFilter, esriSelectionResultEnum.esriSelectionResultNew, false);
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; catch (Exception ex)
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // taken out, not relevant
&amp;nbsp;&amp;nbsp; }

&amp;nbsp;&amp;nbsp; tableSelection.SelectionChanged();
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I run this on a table it runs without an error, but does not show the selection in the tables once it is complete.&amp;nbsp; What am I missing?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Dec 2013 15:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itableselection-in-a-map-document/m-p/707368#M18925</guid>
      <dc:creator>JohnStephens</dc:creator>
      <dc:date>2013-12-02T15:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: ITableSelection in a map document</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itableselection-in-a-map-document/m-p/707369#M18926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;can you try passing a null where clause to see if it selects all records in the stand alone table?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 13:09:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itableselection-in-a-map-document/m-p/707369#M18926</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2013-12-03T13:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: ITableSelection in a map document</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itableselection-in-a-map-document/m-p/707370#M18927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A null queryfilter did work.&amp;nbsp; So, I went ahead and checked the format of my where clauses and magically it started working.&amp;nbsp; Weird.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Dec 2013 11:21:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itableselection-in-a-map-document/m-p/707370#M18927</guid>
      <dc:creator>JohnStephens</dc:creator>
      <dc:date>2013-12-04T11:21:35Z</dc:date>
    </item>
  </channel>
</rss>

