public static void SetDispatchStatus(GridView aGridView1, GridColumn aColStatus, bool aOnlyImage)
{
var imageList = new ImageList();
imageList.ImageSize = new Size(, );
imageList.ColorDepth = ColorDepth.Depth32Bit;
imageList.Images.Add("", Resources.已录入12);
imageList.Images.Add("", Resources.待返工12);
imageList.Images.Add("", Resources.出库中12);
imageList.Images.Add("", Resources.中断待料12);
imageList.Images.Add("", Resources.中断待答复12 );
imageList.Images.Add("", Resources.已完工12);
imageList.Images.Add("", Resources.已完检12);
imageList.Images.Add("", Resources.作废12); imageList.TransparentColor = Color.Transparent;
//
var repositoryItemImageComboBoxStatus = new RepositoryItemImageComboBox();
aColStatus.ToolTip = "状态";
if (aOnlyImage)
{
aColStatus.Width = ; repositoryItemImageComboBoxStatus.Items.AddRange(new[]
{
new ImageComboBoxItem("",JobDispatchStatus.READY,),
new ImageComboBoxItem("",JobDispatchStatus.WAIT_REWORK,),
new ImageComboBoxItem("",JobDispatchStatus.WORKING,),
new ImageComboBoxItem("",JobDispatchStatus.BREAK_FOR_PARTS,),
new ImageComboBoxItem("",JobDispatchStatus.BREAK_FOR_REPLY,),
new ImageComboBoxItem("",JobDispatchStatus.FINISHED,),
new ImageComboBoxItem("",JobDispatchStatus.CHECKED,),
new ImageComboBoxItem("",JobDispatchStatus.CANCELED,), });
}
else
{
repositoryItemImageComboBoxStatus.Items.AddRange(new[]
{
new ImageComboBoxItem("待开工",JobDispatchStatus.READY,),
new ImageComboBoxItem("待返工",JobDispatchStatus.WAIT_REWORK,),
new ImageComboBoxItem("维修中",JobDispatchStatus.WORKING,),
new ImageComboBoxItem("中断待料",JobDispatchStatus.BREAK_FOR_PARTS,),
new ImageComboBoxItem("中断待答复",JobDispatchStatus.BREAK_FOR_REPLY,),
new ImageComboBoxItem("已完工",JobDispatchStatus.FINISHED,),
new ImageComboBoxItem("已完检",JobDispatchStatus.CHECKED,),
new ImageComboBoxItem("已作废",JobDispatchStatus.CANCELED,),
});
}
repositoryItemImageComboBoxStatus.Name = "repositoryItemImageComboBoxStatus";
repositoryItemImageComboBoxStatus.SmallImages = imageList;
//
aColStatus.ColumnEdit = repositoryItemImageComboBoxStatus;
}

效果图:

GridControl的列显示成图片+文字,并且不同的文字对应不同的图片的更多相关文章

  1. VS2003 下GridControl的列显示成图片+文字的形式实现

    public RC_CustomerSolicitListUC() { // 该调用是 Windows.Forms 窗体设计器所必需的. InitializeComponent(); // TODO: ...

  2. DevExpress GridControl导出ExportToXls 数字类型显示成货币格式

    用Dev开发很习惯直接用自带控件导出Excel,现在很少使用原生的Excel API去操作了.除非需要详细的控制. 但别人家封装好的就得按人家的规则的.在使用GridControl导出Excel时发现 ...

  3. CSS实现文字竖排 DIV CSS文字垂直竖列排版显示如何实现?

    DIV CSS实现文字竖排排版显示兼容各大浏览器,让文字垂直竖列排版布局. 有时我们需要一段文字进行从上到下竖列排版,我们知道CSS样式中有一样式可以让其竖列排版,但所有浏览器不全兼容,逼不得已放弃. ...

  4. C# 在网页中将Base64编码的字符串显示成图片

    在写一个接口,返回的json里面有图片,是Base64编码的字符串. 测试接口的时候,发现原来在html显示,是直接可以将Base64编码的字符串显示成图片的. 格式如下: <img src=d ...

  5. 使用 Qt 获取 UDP 数据并显示成图片(2)

    本文首发于 BriFuture 的 个人博客 在我的前一篇文章 使用 Qt 获取 UDP 数据并显示成图片 中,我讲了如何用 Python 模拟发送数据,如何在 Qt 中高效的接收 UDP 数据包并将 ...

  6. 使用MailKit发送带有内嵌图片的邮件且图片不显示成附件

    使用MailKit发送带有内嵌图片的邮件且图片不显示成附件 参考文章:MailKit---发送邮件 注意 在邮件客户端中是否显示内嵌图片为附件依据不同邮件有所不同,暂经测试Outlook和qq不显示为 ...

  7. Android 文字过长TextView如何自动截断并显示成省略号

    当用TextView来显示标题的时候,如果标题内容过长的话,我们不希望其换行显示,这时候我们需要其自动截断,超过的部分显示成省略号. 如下图所示,标题过长,自动换行了,显示不是很好看. 这时候我们需要 ...

  8. [转] BootStrap table增加一列显示序号

    原文地址:https://blog.csdn.net/aboboo5200/article/details/78839208 最近由于项目需要,使用BootStrap table做数据展示,其中要在第 ...

  9. ps中为什么在图片上面添加不了文字

    我们在使用PS对某些图片进行处理时,往往会添加一些文字:但有时因图片格式问题,导致添加文字是一个小黑点,无法看清,下面就为大家讲解一下具体的处理方法. 工具/原料   Photoshop CS5.图片 ...

随机推荐

  1. Ubuntu下编译内核

    一.下载源代码和编译软件的准备 下载内核源代码:http://www.kernel.org/ 注意,点击2.6.25内核的F版,即完整版. 如果你懒得去网站点联接,运行下列命令:  代码: $cd ~ ...

  2. poj 3061 Subsequence

    题目连接 http://poj.org/problem?id=3061 Subsequence Description A sequence of N positive integers (10 &l ...

  3. 关于TableVIew的上下滚动如何探测其边界

    UITableView is a subclass of UIScrollView, and UITableViewDelegate conforms to UIScrollViewDelegate. ...

  4. FPGA入门1

    FPGA入门知识介绍    近几年来,由于现场可编程门阵列(FPGA)的使用非常灵活,又可以无限次的编程,已受到越来越多的电子编程者的喜爱,很多朋友都想学习一些FPGA入门知识准备进行这个行业,现在关 ...

  5. vim时,ctrl+s了一下,程序僵死了

    刚刚在用vim的时候,按了ctrl+s,然后僵死了,ctrl+c.ctrl+d都没有反应. 不知怎么回事,差点就把它kill了,想探探究竟,网上查了一下,原来原来,这是个快捷键. ctrl+s 锁定屏 ...

  6. 数组和字典 swift

    var array = ["A","B"] var array2:[String] = ["A","B"] var ar ...

  7. Matlab 支持向量机(SVM)实现多分类

    1.首先,你需要安装完成Matlab. 2.将libsvm-3.17.zip和drtoolbox.tar文件解压到:libsvm-3.17文件夹和drtoolbox,并放到MATLAB的工具箱安装目录 ...

  8. Notes of the scrum meeting(11/2)

    meeting time:13:00~13:30p.m.,November 2nd,2013 meeting place:3号公寓楼一层 attendees: 顾育豪                  ...

  9. messager(消息窗口)

    一.$.messager.alert()类似js中的alert('String') 方法参数:title, msg, icon, function(回调函数) 描述:title头部面板标题.msg主要 ...

  10. 安装Windows7出现:”安装程序无法创建新的系统分区 也无法定位系统分区“ 终极解决方案

    参考:地址 解决方法: 1.先格式化一下你要装的那个盘,然后,拔出U盘,啥也别动,只拔出U盘就行,再装上U盘,然后刷新一下[选硬盘那里的高级选项中有格式化和刷新],再选择要安装的硬盘点下一步,OK了, ...