specifying formatter for a th element in a Widget

466
0
08-22-2010 02:59 PM
HaroldBostic
Occasional Contributor II
Hello,

I'm hoping this is an easy one. I have the follwing markup as the template for a widget of mine:
<div id="cpClosest" style="float:left;width:35%;height:200px"">
  <table dojoType="dojox.grid.DataGrid" dojoAttachPoint="_grdClosest" escapeHTMLInData="false" rowsPerPage="10" rowSelector="20px" style="height:200px;">
   <thead>
    <tr>
     <th field="Closest" width="110px" formatter="_gridHTMLFormatter" dojoAttachPoint="_fldClosest" ><span dojoAttachPoint="_grdClosestColumn">GET CLOSEST Person</span></th> 
     <th field="ClosestFeatureTo" width="100%" formatter="_gridHTMLFormatter" >NAME</th>
    </tr>
   </thead>
  </table>
 </div>


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.  Ive tried setting it in startup but it still does not take, I've also tried setting the formatterScope property for the dojox grid and that has not effect. 

Anybody know what I'm doing wrong.  I'm willing try what I've already tried as I may have missed a step.

Thanks in advance
0 Kudos
0 Replies