<?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 Pass Field Parameters to Dojo DataGrid Hyperlink in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pass-field-parameters-to-dojo-datagrid-hyperlink/m-p/236155#M21997</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;I am trying to create a hyperlink column in the dojo dataGrid that accepts or recognizes field names from my REST service and passes them to a url. I have been able to achieve this with an info template, and am hoping to do the same with the datagrid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;a href='http://surveyor.slco.org/gis/map/Corner_Reports/surveysimage.cfm?subdir=${subdir}&amp;amp;page_id=${page_id}.pdf'&amp;gt;PDF&amp;lt;/a&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found this info on the ArcGIS Server blog, but have not had any luck:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;You can use a custom formatter to insert a hyperlink as well. You can associate a formatter with a field by setting the formatter to a function that creates the link:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;th field="STATE_NAME" formatter="makeLink" width="100px"&amp;gt;State&amp;lt;/th&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Here's the create a link function, in this case it just takes the state name and builds a hyperlink to the wikipedia entry for that state.&lt;BR /&gt;&lt;BR /&gt;function makeLink(name){&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var link =&amp;nbsp; "&amp;lt;a&amp;nbsp;&amp;nbsp; href=\"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://en.wikipedia.org/wiki/" rel="nofollow" target="_blank"&gt;http://en.wikipedia.org/wiki/&lt;/A&gt;&lt;SPAN&gt;" + name +&amp;nbsp; "\" target=\"_blank\"&amp;gt;" + name + "&amp;lt;/a&amp;gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;return link;&lt;BR /&gt;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated!!:D&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Dec 2011 19:55:44 GMT</pubDate>
    <dc:creator>EmilyLaMunyon</dc:creator>
    <dc:date>2011-12-09T19:55:44Z</dc:date>
    <item>
      <title>Pass Field Parameters to Dojo DataGrid Hyperlink</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pass-field-parameters-to-dojo-datagrid-hyperlink/m-p/236155#M21997</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;I am trying to create a hyperlink column in the dojo dataGrid that accepts or recognizes field names from my REST service and passes them to a url. I have been able to achieve this with an info template, and am hoping to do the same with the datagrid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;a href='http://surveyor.slco.org/gis/map/Corner_Reports/surveysimage.cfm?subdir=${subdir}&amp;amp;page_id=${page_id}.pdf'&amp;gt;PDF&amp;lt;/a&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found this info on the ArcGIS Server blog, but have not had any luck:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;You can use a custom formatter to insert a hyperlink as well. You can associate a formatter with a field by setting the formatter to a function that creates the link:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;th field="STATE_NAME" formatter="makeLink" width="100px"&amp;gt;State&amp;lt;/th&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Here's the create a link function, in this case it just takes the state name and builds a hyperlink to the wikipedia entry for that state.&lt;BR /&gt;&lt;BR /&gt;function makeLink(name){&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var link =&amp;nbsp; "&amp;lt;a&amp;nbsp;&amp;nbsp; href=\"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://en.wikipedia.org/wiki/" rel="nofollow" target="_blank"&gt;http://en.wikipedia.org/wiki/&lt;/A&gt;&lt;SPAN&gt;" + name +&amp;nbsp; "\" target=\"_blank\"&amp;gt;" + name + "&amp;lt;/a&amp;gt;";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;return link;&lt;BR /&gt;&lt;BR /&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated!!:D&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2011 19:55:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/pass-field-parameters-to-dojo-datagrid-hyperlink/m-p/236155#M21997</guid>
      <dc:creator>EmilyLaMunyon</dc:creator>
      <dc:date>2011-12-09T19:55:44Z</dc:date>
    </item>
  </channel>
</rss>

