<?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: FeatureDataGrid Behaviour in WPF vs Silverlight in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-behaviour-in-wpf-vs-silverlight/m-p/444208#M11520</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use "StringFormat" in your Binding.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;!-- POPULATION is an integer field (shows 1,000,000 for 1000000) --&amp;gt;
&amp;lt;DataGridTextColumn Binding="{Binding POPULATION, StringFormat=0\,000}" Header="POPULATION" CanUserSort="True" /&amp;gt;
&amp;lt;!-- STATS_DATE is a DateTime field --&amp;gt;
&amp;lt;DataGridTextColumn Binding="{Binding STATS_DATE, StringFormat='MM-DD-YYYY'}" Header="STATS_DATE" CanUserSort="True" /&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 19:51:52 GMT</pubDate>
    <dc:creator>AliMirzabeigi</dc:creator>
    <dc:date>2021-12-11T19:51:52Z</dc:date>
    <item>
      <title>FeatureDataGrid Behaviour in WPF vs Silverlight</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-behaviour-in-wpf-vs-silverlight/m-p/444205#M11517</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;SPAN&gt;when I use an ESRI:FeatureDataGrid in a WPF control it looks different and behaves different than the same control with the same properties in a Silverlight application. Sorting of a FeatureDataGrid in WPF for example is not supported (there's no events for column headers, except drag and reordering events). But when I use the featureDataGridControl in Silverlight, sorting is out of the box available by clicking on the column headers. Has this something to do with the control template? How can I enable sorting on the FeatureDataGrid within a WPF Control? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Stefan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 14:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-behaviour-in-wpf-vs-silverlight/m-p/444205#M11517</guid>
      <dc:creator>stefanschlaefli</dc:creator>
      <dc:date>2010-09-28T14:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Behaviour in WPF vs Silverlight</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-behaviour-in-wpf-vs-silverlight/m-p/444206#M11518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Stefan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureDataGrid controls in ESRI API are extended verisons of Microsoft DataGrid controls in WPF and Silverlight platforms that are basically different controls. If some of your attributes are not sortable in WPF then you can do the following in your XAML code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Set FeatureDataGrid's "AutoGenerateColumns" property to FALSE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esri:FeatureDataGrid AutoGenerateColumns="False" ................ &amp;gt;
&amp;lt;/esri:FeatureDataGrid&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Define DataGrid columns collection in your FeatureDataGrid for the attributes you would like to shown and set their "CanUserSort" property to TRUE:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;DataGrid.Columns&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;DataGridTextColumn Binding="{Binding STATE_NAME}" Header="State Name" CanUserSort="True" /&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- More columns here (could be DataGridComboBoxColumn, DataGridComboBoxColumn, DataGridTemplateColumn, or a DataGridTemplateColumn --&amp;gt;
&amp;lt;/DataGrid.Columns&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:51:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-behaviour-in-wpf-vs-silverlight/m-p/444206#M11518</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2021-12-11T19:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Behaviour in WPF vs Silverlight</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-behaviour-in-wpf-vs-silverlight/m-p/444207#M11519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ali&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for this hint, it works fine . Do you also know if I can format the values in the TextColumns (rounding of values etc.)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Stefan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 08:43:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-behaviour-in-wpf-vs-silverlight/m-p/444207#M11519</guid>
      <dc:creator>stefanschlaefli</dc:creator>
      <dc:date>2010-09-29T08:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureDataGrid Behaviour in WPF vs Silverlight</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-behaviour-in-wpf-vs-silverlight/m-p/444208#M11520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use "StringFormat" in your Binding.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;!-- POPULATION is an integer field (shows 1,000,000 for 1000000) --&amp;gt;
&amp;lt;DataGridTextColumn Binding="{Binding POPULATION, StringFormat=0\,000}" Header="POPULATION" CanUserSort="True" /&amp;gt;
&amp;lt;!-- STATS_DATE is a DateTime field --&amp;gt;
&amp;lt;DataGridTextColumn Binding="{Binding STATS_DATE, StringFormat='MM-DD-YYYY'}" Header="STATS_DATE" CanUserSort="True" /&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:51:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/featuredatagrid-behaviour-in-wpf-vs-silverlight/m-p/444208#M11520</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2021-12-11T19:51:52Z</dc:date>
    </item>
  </channel>
</rss>

