myborobudur
myborobudur

Reputation: 4435

Adding icon to dojo data grid

I'd like to set a icon in a column in a dojox data grid. Can I set the class icon like in the dojo tree: dijit/Tree getIconClass?

Thanks

Upvotes: 0

Views: 622

Answers (1)

Hackie
Hackie

Reputation: 125

maybe you should try formatter

<script>
    function imgFormatter(s) {
        return '<img src="' + s + '"/>';
    }
</script>
 <table data-dojo-type="dojox.grid.DataGrid">
     <thead>
         <tr>
              <th field="col" formatter="imgFormatter"></th>
         </tr>
     </thead>
 </table>

Upvotes: 2

Related Questions