Storing image in dojo datagrid

守給你的承諾、 提交于 2020-01-04 05:20:11

问题


How to add an image to Dojo datagrid columns?

I have different css classes for different images. How to make it display in datagrid? How to store image in datastore?


回答1:


I would try with a formatter in the layout structure:

var layout = [
   {
       field: 'image', name: ' ', 
       width: 'auto', formatter: function(value) { 
           var src = imageURL; 
           return "<img src=\"" + src + "\" />"; 
       } 
    }];


来源:https://stackoverflow.com/questions/7316050/storing-image-in-dojo-datagrid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!