<?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: Displaying KeyValuePair on DataGrid, customization issue in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/displaying-keyvaluepair-on-datagrid-customization/m-p/14681#M370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All KeyValue pairs are returned as a type created by FeatureDataGrid (something like ESRI.ArcGIS.Client.Toolkit.DataSource.TempType...). You would need to do the following to get the value of a property say, WEB_SITE in your SelectedItem, then check whether it contains a URL value:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
object selectedItem = (sender as DataGrid).SelectedItem;
object stateName = selectedItem.GetType().GetProperty("WEB_SITE").GetValue(selectedItem, null);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:35:25 GMT</pubDate>
    <dc:creator>AliMirzabeigi</dc:creator>
    <dc:date>2021-12-10T20:35:25Z</dc:date>
    <item>
      <title>Displaying KeyValuePair on DataGrid, customization issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/displaying-keyvaluepair-on-datagrid-customization/m-p/14678#M367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've implemented something similar to the following example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#Identify"&gt;http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/samples/start.htm#Identify&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My reasons for doing so are that I have multiple layers that I'm querying against, and therefore, will have a variety of different data being returned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem is that I have URLs in my data that need to be clickable. I'm at a loss as to how to make these links clickable in a DataGrid if it's only one row or cell, not an entire column (columns are easy, thankfully, after all). I've considered a multitude of different approaches, from "look for a third-party data-grid control", to "do something ugly with control templating", to "reserialize all the possible data I could be getting and display differently", to "just give up and have a good cry".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm leaning towards the final option. Since the data is coming to me in KeyValuePairs, I'm kind of up a creek on my code being simple and elegant, and I'm probably going to have to reserialize, at the least, unless anyone has any better ideas.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any recommendations/comments/happy thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 14:43:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/displaying-keyvaluepair-on-datagrid-customization/m-p/14678#M367</guid>
      <dc:creator>KevinSesock</dc:creator>
      <dc:date>2010-09-28T14:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying KeyValuePair on DataGrid, customization issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/displaying-keyvaluepair-on-datagrid-customization/m-p/14679#M368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please take a look at the following post:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/8797-Hyperlinking-possibilities?highlight=DataGrid"&gt;http://forums.arcgis.com/threads/8797-Hyperlinking-possibilities?highlight=DataGrid&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 15:12:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/displaying-keyvaluepair-on-datagrid-customization/m-p/14679#M368</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2010-09-28T15:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying KeyValuePair on DataGrid, customization issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/displaying-keyvaluepair-on-datagrid-customization/m-p/14680#M369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for getting back to me. I've seen that. That just created more questions then it answered. For example, while testing in DataGrid_SelectionChanged method to see if the SelectedItem Key is "LINK" or "URL", I've discovered that (sender as DataGrid).SelectedItem returns a DataGridItem, not a KeyValuePair. Any thoughts on how to get the Key and then the value as well?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Sep 2010 17:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/displaying-keyvaluepair-on-datagrid-customization/m-p/14680#M369</guid>
      <dc:creator>KevinSesock</dc:creator>
      <dc:date>2010-09-28T17:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying KeyValuePair on DataGrid, customization issue</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/displaying-keyvaluepair-on-datagrid-customization/m-p/14681#M370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All KeyValue pairs are returned as a type created by FeatureDataGrid (something like ESRI.ArcGIS.Client.Toolkit.DataSource.TempType...). You would need to do the following to get the value of a property say, WEB_SITE in your SelectedItem, then check whether it contains a URL value:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
object selectedItem = (sender as DataGrid).SelectedItem;
object stateName = selectedItem.GetType().GetProperty("WEB_SITE").GetValue(selectedItem, null);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:35:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/displaying-keyvaluepair-on-datagrid-customization/m-p/14681#M370</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2021-12-10T20:35:25Z</dc:date>
    </item>
  </channel>
</rss>

