将图像存储在dojo datagrid中 [英] Storing image in dojo datagrid

查看:135
本文介绍了将图像存储在dojo datagrid中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将图像添加到Dojo datagrid列?

How to add an image to Dojo datagrid columns?

我为不同的图像提供了不同的CSS类。如何使其在datagrid中显示?
如何在数据存储区中存储图像?

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

推荐答案

我会在布局结构中尝试使用格式化程序:

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 + "\" />"; 
       } 
    }];

这篇关于将图像存储在dojo datagrid中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆