将图标添加到dojo数据网格

时间:2012-04-17 15:04:37

标签: dojo dojox.grid.datagrid

我想在dojox数据网格的列中设置一个图标。我可以像在dojo树中设置类图标:dijit/Tree getIconClass

由于

1 个答案:

答案 0 :(得分:2)

也许你应该尝试格式化

<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>
相关问题