<?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 ITableWindow custom selection... is it possible? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638507#M17183</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to limit the fields in a selection with ITableWindow? I'm trying to select specific data from a table and I am successful doing that. However, I'm not able to limit the results returned in the display to specific fields. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like my query, "Select field1, field2, field3... From table Where..." to display on the the fields in the "Select" portion of the query in the the ITableWindow.ShowSelected = true window. Just display exactly what I want in the query without displaying the additional fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course if that wasn't enough, I'd also like to display one field from a joined table in the results. "Select table1.field1, table1.field2, table1.field3, table2.field1... From table1, table2 Where..." But first things first, if I could get it to just display the requested fields first and no other fields that would be a great leap forward.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried using IQueryFilter.Subfields without success. I'm using ITableSelection, ITableWindow, and IStandaloneTableCollection. I determine if the standalone table is available in the map document, add it if not add it. NOTE: I've tried limiting the SubFields to just one table, field1, field2, field3..., without the table1. prefix without success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;

QueryFilter.SubFields = "table1.field1, table1.field2, table1.field3, table2.field1";
QueryFilter.WhereClause = "WHERE..."
TableSelection.SelectionSet = Table.Select(QueryFilter, esriSelectionType.esriSelectionTypeHybrid,
 esriSelectionOption.esriSelectionOptionNormal, Workspace);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Dec 2010 22:42:27 GMT</pubDate>
    <dc:creator>GregRieck</dc:creator>
    <dc:date>2010-12-02T22:42:27Z</dc:date>
    <item>
      <title>ITableWindow custom selection... is it possible?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638507#M17183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to limit the fields in a selection with ITableWindow? I'm trying to select specific data from a table and I am successful doing that. However, I'm not able to limit the results returned in the display to specific fields. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like my query, "Select field1, field2, field3... From table Where..." to display on the the fields in the "Select" portion of the query in the the ITableWindow.ShowSelected = true window. Just display exactly what I want in the query without displaying the additional fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course if that wasn't enough, I'd also like to display one field from a joined table in the results. "Select table1.field1, table1.field2, table1.field3, table2.field1... From table1, table2 Where..." But first things first, if I could get it to just display the requested fields first and no other fields that would be a great leap forward.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried using IQueryFilter.Subfields without success. I'm using ITableSelection, ITableWindow, and IStandaloneTableCollection. I determine if the standalone table is available in the map document, add it if not add it. NOTE: I've tried limiting the SubFields to just one table, field1, field2, field3..., without the table1. prefix without success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;

QueryFilter.SubFields = "table1.field1, table1.field2, table1.field3, table2.field1";
QueryFilter.WhereClause = "WHERE..."
TableSelection.SelectionSet = Table.Select(QueryFilter, esriSelectionType.esriSelectionTypeHybrid,
 esriSelectionOption.esriSelectionOptionNormal, Workspace);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 22:42:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638507#M17183</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2010-12-02T22:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: ITableWindow custom selection... is it possible?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638508#M17184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I see two paths here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You change the visible fields in the layer.&amp;nbsp; That means when you view all rows just selected rows, you will see only the fields you are interested in.&amp;nbsp; You might even find the event that switches between all rows and selected rows and apply the change to the tableview then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Another avenue is a TableQueryName or a FeatureQueryName.&amp;nbsp; This is not a selection on your table though.&amp;nbsp; It is creating a a new table in memory based on a query or view (which can contain joined fields from another table) and add it to the map.&amp;nbsp; It would appear as an another table with only the rows and fields you want.&amp;nbsp; There is an example in the dev help under IQueryName2.&amp;nbsp; If you go that route make sure both tables are in the same workspace or else it will be slow.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 12:12:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638508#M17184</guid>
      <dc:creator>AlexanderGray</dc:creator>
      <dc:date>2010-12-03T12:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: ITableWindow custom selection... is it possible?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638509#M17185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I see two paths here.&lt;BR /&gt;You change the visible fields in the layer.&amp;nbsp; That means when you view all rows just selected rows, you will see only the fields you are interested in.&amp;nbsp; You might even find the event that switches between all rows and selected rows and apply the change to the tableview then.&lt;BR /&gt;Another avenue is a TableQueryName or a FeatureQueryName.&amp;nbsp; This is not a selection on your table though.&amp;nbsp; It is creating a a new table in memory based on a query or view (which can contain joined fields from another table) and add it to the map.&amp;nbsp; It would appear as an another table with only the rows and fields you want.&amp;nbsp; There is an example in the dev help under IQueryName2.&amp;nbsp; If you go that route make sure both tables are in the same workspace or else it will be slow.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the response Alexander. I've made a lot of progress but I'm having problems getting the data to display. I can get the TableQueryName table to appear with the correct fields etc.. However, the table is empty. Any thoughts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS10 SP1 I'm using a Personal GeoDatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 22:31:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638509#M17185</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2010-12-03T22:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: ITableWindow custom selection... is it possible?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638510#M17186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thank you for the response Alexander. I've made a lot of progress but I'm having problems getting the data to display. I can get the TableQueryName table to appear with the correct fields etc.. However, the table is empty. Any thoughts?&lt;BR /&gt;&lt;BR /&gt;ArcGIS10 SP1 I'm using a Personal GeoDatabase.&lt;BR /&gt;&lt;BR /&gt;Greg&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I figured it out. I had the table window set to show selected. Once I removed that the data displayed. I like how you can give the table a name, essentially a title. However, you can't edit the data in this type of table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to be able to edit the data and to add one field from another table. I'll be switching back to the visible fields approach using ITableFields and IFieldInfo3. But I can't seem to get the selection to contain the joined data. Do you have any suggestions or samples on do a selection with joined data?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Dec 2010 15:36:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638510#M17186</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2010-12-04T15:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: ITableWindow custom selection... is it possible?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638511#M17187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First thing is to make the join using an inmemoryrelationship class.&amp;nbsp; There are some samples on that in the dev help.&amp;nbsp; You should be able to access the joined fields through the IDisplayTable.&amp;nbsp; The IDisplayTable also contains the SelectDisplayTable method which should help you with the joined fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Dec 2010 13:23:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/itablewindow-custom-selection-is-it-possible/m-p/638511#M17187</guid>
      <dc:creator>AlexanderGray</dc:creator>
      <dc:date>2010-12-06T13:23:30Z</dc:date>
    </item>
  </channel>
</rss>

