<?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 specifying formatter for a th element in a Widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/specifying-formatter-for-a-th-element-in-a-widget/m-p/275103#M25379</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'm hoping this is an easy one. I have the follwing markup as the template for a widget of mine:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;div id="cpClosest" style="float:left;width:35%;height:200px""&amp;gt;
&amp;nbsp; &amp;lt;table dojoType="dojox.grid.DataGrid" dojoAttachPoint="_grdClosest" escapeHTMLInData="false" rowsPerPage="10" rowSelector="20px" style="height:200px;"&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;thead&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th field="Closest" width="110px" formatter="_gridHTMLFormatter" dojoAttachPoint="_fldClosest" &amp;gt;&amp;lt;span dojoAttachPoint="_grdClosestColumn"&amp;gt;GET CLOSEST Person&amp;lt;/span&amp;gt;&amp;lt;/th&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th field="ClosestFeatureTo" width="100%" formatter="_gridHTMLFormatter" &amp;gt;NAME&amp;lt;/th&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/thead&amp;gt;
&amp;nbsp; &amp;lt;/table&amp;gt;
 &amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want the _gridHTMLFormatter function to be encapsulated in my widget, however, I can't get m th elements to recognize that function unless it is decalred in the global namespace.&amp;nbsp; Ive tried setting it in &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;startup&lt;/SPAN&gt;&lt;SPAN&gt; but it still does not take, I've also tried setting the formatterScope property for the dojox grid and that has not effect.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody know what I'm doing wrong.&amp;nbsp; I'm willing try what I've already tried as I may have missed a step.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Aug 2010 21:59:11 GMT</pubDate>
    <dc:creator>HaroldBostic</dc:creator>
    <dc:date>2010-08-22T21:59:11Z</dc:date>
    <item>
      <title>specifying formatter for a th element in a Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/specifying-formatter-for-a-th-element-in-a-widget/m-p/275103#M25379</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'm hoping this is an easy one. I have the follwing markup as the template for a widget of mine:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;div id="cpClosest" style="float:left;width:35%;height:200px""&amp;gt;
&amp;nbsp; &amp;lt;table dojoType="dojox.grid.DataGrid" dojoAttachPoint="_grdClosest" escapeHTMLInData="false" rowsPerPage="10" rowSelector="20px" style="height:200px;"&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;thead&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th field="Closest" width="110px" formatter="_gridHTMLFormatter" dojoAttachPoint="_fldClosest" &amp;gt;&amp;lt;span dojoAttachPoint="_grdClosestColumn"&amp;gt;GET CLOSEST Person&amp;lt;/span&amp;gt;&amp;lt;/th&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;th field="ClosestFeatureTo" width="100%" formatter="_gridHTMLFormatter" &amp;gt;NAME&amp;lt;/th&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/thead&amp;gt;
&amp;nbsp; &amp;lt;/table&amp;gt;
 &amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want the _gridHTMLFormatter function to be encapsulated in my widget, however, I can't get m th elements to recognize that function unless it is decalred in the global namespace.&amp;nbsp; Ive tried setting it in &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;startup&lt;/SPAN&gt;&lt;SPAN&gt; but it still does not take, I've also tried setting the formatterScope property for the dojox grid and that has not effect.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody know what I'm doing wrong.&amp;nbsp; I'm willing try what I've already tried as I may have missed a step.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Aug 2010 21:59:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/specifying-formatter-for-a-th-element-in-a-widget/m-p/275103#M25379</guid>
      <dc:creator>HaroldBostic</dc:creator>
      <dc:date>2010-08-22T21:59:11Z</dc:date>
    </item>
  </channel>
</rss>

