<?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: Declarative DataGrid- cannot format content in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/declarative-datagrid-cannot-format-content/m-p/297465#M27347</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ken! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2014 17:13:45 GMT</pubDate>
    <dc:creator>StefanCoe</dc:creator>
    <dc:date>2014-08-29T17:13:45Z</dc:date>
    <item>
      <title>Declarative DataGrid- cannot format content</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/declarative-datagrid-cannot-format-content/m-p/297463#M27345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a DataGrid that gets updated when the user hovers over certain features. It works fine, but I need to format some of the fields/values. I am trying to use the formatter method that is supposed to call a function in the javascript script section. As far as I can tell, the function is not being called. Here is the markup:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="javascript" name="code"&gt;&amp;lt;div id="bottomPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom'"&amp;gt; &amp;lt;b&amp;gt;Financial Data:&amp;lt;/b&amp;gt; &amp;nbsp; &amp;lt;table data-dojo-type="dojox.grid.EnhancedGrid" data-dojo-id="grid" id="grid" data-dojo-props="rowsPerPage:'5', rowSelector:'20px'" style="height:250px; width:100%"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;thead&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;tr&amp;gt; &amp;nbsp; &amp;lt;th field="Phase" width="50px" &amp;gt;Phase&amp;lt;/th&amp;gt; &amp;nbsp; &amp;lt;th field="Year" width="50px"&amp;gt;Year&amp;lt;/th&amp;gt; &amp;nbsp; &amp;lt;th field="FedFundSource" width="50px"&amp;gt;Funding Type&amp;lt;/th&amp;gt; &amp;nbsp; &amp;lt;th field="FedFundAmount" formatter= "formatCost" &amp;gt;Federal Funding&amp;lt;/th&amp;gt; &amp;nbsp; &amp;lt;th field="StateFundAmount" formatter= "formatCost" &amp;gt;State Funding&amp;lt;/th&amp;gt; &amp;nbsp; &amp;lt;th field="LocalFundAmount" formatter= "formatCost" &amp;gt;Local Funding&amp;lt;/th&amp;gt; &amp;nbsp; &amp;lt;th field="SponsorObDate" width="100px"&amp;gt;Projected Obligation Date&amp;lt;/th&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/tr&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/thead&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/table&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is the function:&lt;/P&gt;&lt;PRE class="javascript" name="code"&gt;function formatCost (Cost) {&amp;nbsp; &amp;nbsp; console.log("%s", "got here"); &amp;nbsp; return "$" + Cost.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice is much appreciated!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 23:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/declarative-datagrid-cannot-format-content/m-p/297463#M27345</guid>
      <dc:creator>StefanCoe</dc:creator>
      <dc:date>2014-08-28T23:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Declarative DataGrid- cannot format content</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/declarative-datagrid-cannot-format-content/m-p/297464#M27346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where do you have the formatCost function? If you are using AMD style, it is within the require section? If so, the HTML markup will not be able to access it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 12:43:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/declarative-datagrid-cannot-format-content/m-p/297464#M27346</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-08-29T12:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Declarative DataGrid- cannot format content</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/declarative-datagrid-cannot-format-content/m-p/297465#M27347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ken! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 17:13:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/declarative-datagrid-cannot-format-content/m-p/297465#M27347</guid>
      <dc:creator>StefanCoe</dc:creator>
      <dc:date>2014-08-29T17:13:45Z</dc:date>
    </item>
  </channel>
</rss>

