<?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: How to get a map layer's attribute values in a stand-alone mobile app? in ArcGIS for Windows Mobile Questions</title>
    <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598633#M2554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Instead of using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DataTable table = layer.GetDataTable(); use FeatureDataTable table = layer.GetDataTable();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then assign it as the source of your datagrid:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dataGridView1.DataSource = table;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Sep 2010 17:30:07 GMT</pubDate>
    <dc:creator>AngelGonzalez</dc:creator>
    <dc:date>2010-09-15T17:30:07Z</dc:date>
    <item>
      <title>How to get a map layer's attribute values in a stand-alone mobile app?</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598631#M2552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am developing a stand-alone application with Mobile SDK 9.3.1. The application does not use a database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How could I list the values of a certain map layer's attribute (table row values) in my application?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using a locally stored mapcache. I am able to retrieve the names of the attributes (column names) with the following piece of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI.ArcGIS.Mobile.MobileServices.FeatureLayer layer = this.mobileService.Layers[0] as ESRI.ArcGIS.Mobile.MobileServices.FeatureLayer; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DataTable table = layer.GetDataTable();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; foreach (DataColumn column in table.Columns)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Debug.WriteLine(column.ToString()); &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I have not been able to get the rows of the columns and their content data with table.Rows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, table.Rows.Count returns 0, even though the attribute table does have values (checked with ArcMap), and the corresponding items are displayed on the mobile map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I doing wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Sep 2010 13:41:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598631#M2552</guid>
      <dc:creator>TanjaKantola</dc:creator>
      <dc:date>2010-09-15T13:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a map layer's attribute values in a stand-alone mobile app?</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598632#M2553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had the same issue. When I sent in a blank new queryfilter it worked. Try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DataTable table = layer.GetDataTable(new QueryFilter);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Sep 2010 17:15:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598632#M2553</guid>
      <dc:creator>MelindaFrost</dc:creator>
      <dc:date>2010-09-15T17:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a map layer's attribute values in a stand-alone mobile app?</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598633#M2554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Instead of using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DataTable table = layer.GetDataTable(); use FeatureDataTable table = layer.GetDataTable();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;then assign it as the source of your datagrid:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dataGridView1.DataSource = table;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Sep 2010 17:30:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598633#M2554</guid>
      <dc:creator>AngelGonzalez</dc:creator>
      <dc:date>2010-09-15T17:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a map layer's attribute values in a stand-alone mobile app?</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598634#M2555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I had the same issue. When I sent in a blank new queryfilter it worked. Try:&lt;BR /&gt;DataTable table = layer.GetDataTable(new QueryFilter);&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or you use a null parameter to get all data:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;FeatureDataTable table = layer.GetDataTable(null);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For not selecting all data it is good to use the QueryFilter&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
QueryFilter queryFilter1 = new QueryFilter(string.Format("ID = {0} AND JAHR = {1}", id, jahr), true);
FeatureDataTable table = layer.GetDataTable(queryFilter1);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For selecting data by geometry:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
QueryFilter queryFilter2 = new QueryFilter();
queryFilter2.Geometry = _aktGeom.GetExtent();
queryFilter2.GeometricRelationship = GeometricRelationshipType.Intersect;
FeatureDataTable table = layer.GetDataTable(queryFilter2);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:42:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598634#M2555</guid>
      <dc:creator>MaximilianGlas</dc:creator>
      <dc:date>2021-12-12T01:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a map layer's attribute values in a stand-alone mobile app?</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598635#M2556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you all for the replies! They helped to solve the issue &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Sep 2010 05:23:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/how-to-get-a-map-layer-s-attribute-values-in-a/m-p/598635#M2556</guid>
      <dc:creator>TanjaKantola</dc:creator>
      <dc:date>2010-09-24T05:23:28Z</dc:date>
    </item>
  </channel>
</rss>

