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. Android--ViewPager的无限轮播

    ViewPage_RadioButton实现带小圆点的无限轮播,效果还能凑合着用. 1.在ViewPage的监听里面这样处理 @Override public void onPageSelected( ...

  2. hdu 1381 Crazy Search

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=1381 Crazy Search Description Many people like to sol ...

  3. centos下安装nagios

    摘要Nagios是一款开源的免费网络监视工具,能有效监控Windows.Linux和Unix的主机状态,交换机路由器等网络设置,打印机等. Nagios是一款开源的免费网络监视工具,能有效监控Wind ...

  4. FTP上传文件夹

    文件上传类 using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; usi ...

  5. 使用NPOI完成导出Excel文件

    参考网址:http://blog.csdn.net/tiemufeng1122/article/details/6732588 能够实现  点击按钮弹出下载框    的功能,如图: HTML代码: & ...

  6. 时间日期设置--ctime头文件

    简述:ctime头文件中的4中与时间相关的数据类型 <ctime>头文件中定义了4种与时间有关的数据类型,如下:clock_tsize_ttime_tstruct tm clock_tCl ...

  7. panel面板

    描述:作为承载其他内容的容器的,装载其他组件基础,可折叠.关闭.最大化.最小化和自定义行为.面板可以很容易地嵌入到web页面的任何位置. 其他属性请参考api! 案例1:纯html生成 <div ...

  8. Asp.net将图片转为Base64编码

    protected void Page_Load(object sender, EventArgs e) { Image img = new Bitmap(Server.MapPath("/ ...

  9. 【Flatten Binary Tree to Linked List】cpp

    题目: Given a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 5 / \ \ 3 4 ...

  10. IOS常用加密Encryption

    NSString+Encryption.h // // NSString+Encryption.h // haochang // // Created by Administrator on 14-4 ...