Dev Express之ImageComboBoxEdit,RepositoryItemImageComboBox使用方式

1.使用ImageComboBoxEdit实现下拉框键值数据函数

        public static void InitCmb(ImageComboBoxEdit cmb, DataTable source, string value, string text, bool isDefaultNull)
{
ImageComboBoxItem[] items = new ImageComboBoxItem[source.Rows.Count +];
int i = ;
if (isDefaultNull)
{
items[i] = new ImageComboBoxItem();
items[i].Description = "";
items[i].Value = "";
items[i].ImageIndex = -;
i++;
} foreach (DataRow dr in source.Rows)
{
items[i] = new ImageComboBoxItem();
items[i].Description = dr[text].ToString();
items[i].Value = dr[value];
items[i].ImageIndex = -;
i++;
}
cmb.Properties.Items.Clear();
cmb.Properties.Items.AddRange(items);
cmb.EditValue = items[].Value;
}

2.使用RepositoryItemImageComboBox实现GridControl内容Cell内下拉键值数据函数

        public static void InitCmb(RepositoryItemImageComboBox repImageComboBox, DataTable source,string value,string text,bool isDefaultNull)
{
ImageComboBoxItem[] items = new ImageComboBoxItem[source.Rows.Count+];
int i=;
if (isDefaultNull)
{
items[i] = new ImageComboBoxItem();
items[i].Description = "";
items[i].Value = "";
items[i].ImageIndex = -;
i++;
}
foreach (DataRow dr in source.Rows)
{
items[i] = new ImageComboBoxItem();
items[i].Description = dr[text].ToString();
items[i].Value = dr[value];
items[i].ImageIndex = -;
i++;
}
repImageComboBox.Items.AddRange(items);
}

3.使用RepositoryItemImageComboBox/ImageComboBox与ImageCollection结合实现GridControl内容Cell内下拉图片数据函数

        public static void InitImgCmb(RepositoryItemImageComboBox repImageComboBox, DataTable source, string value, bool isDefaultNull)
{
ImageComboBoxItem[] items = new ImageComboBoxItem[source.Rows.Count + ];
int i = ;
if (isDefaultNull)
{
items[i] = new ImageComboBoxItem();
items[i].Description = "";
items[i].Value = "";
items[i].ImageIndex = -;
i++;
}
foreach (DataRow dr in source.Rows)
{
items[i] = new ImageComboBoxItem();
items[i].Description = "";
items[i].Value = dr[value];
if(Int32.Parse(items[i].Value.ToString()) == ){
items[i].ImageIndex = ;
}else if(Int32.Parse(items[i].Value.ToString()) == ){
items[i].ImageIndex = ;
}else if(Int32.Parse(items[i].Value.ToString()) == ){
items[i].ImageIndex = ;
}else if(Int32.Parse(items[i].Value.ToString()) == ){
items[i].ImageIndex = ;
}else if(Int32.Parse(items[i].Value.ToString()) == ){
items[i].ImageIndex = ;
}
i++;
}
repImageComboBox.Items.AddRange(items);
}

Dev Express之ImageComboBoxEdit,RepositoryItemImageComboBox使用方式的更多相关文章

  1. Dev Express Report 学习总结(八)Dev Express Reports 常见问题总结

    1. 在新建ASP.NET Dev Express Report时的两种方式: A. 右键Add DevExpress Item->New Item->All->从Web Repor ...

  2. node.js 下依赖Express 实现post 4种方式提交参数

    上面这个图好有意思啊,哈哈, v8威武啊.... 在2014年的最后一天和大家分享关于node.js 如何提交4种格式的post数据. 上上一篇说到了关于http协议里定义的4种常见数据的post方法 ...

  3. Dev Express 安装

    Dev Express 安装 点击DevExpressUniversalTrialComplete-20151209.exe开始安装 选择需要安装的产品   选择需要安装的产品目录,这里设置为D盘 开 ...

  4. Dev Express Report 学习总结(一) 基础知识总结

    Dev Express,一个非常优秀的报表控件.像其他报表一样,该报表也包括几个主要部分:Report Header,Page Header,Group Header,Detail,Group Foo ...

  5. DEV Express

    记录在使用DEV Express中遇到的所有问题及解决方案 问题1:将Dev11升级到Dev14 解决方案:将解决方案中原有Dev引用删除,重新添加必须的Dev14引用,问题解决: 问题2:LC.ex ...

  6. 2016.1.19 DEV Express控件GirdControl使用

    103.GridControl中添加Button RunDesigner,添加一列,设置对应字段FiledName,ColumnEdit选择ButtonEdit,此时默认风格像下拉框,需调整属性: 在 ...

  7. DEV Express中Bar Manager的使用

    未排版 在barManager中可以添加多种元素,如皮肤按钮,复选框等,但是下拉菜单却给出了多个冗余的控件. 遗留问题:怎么设置Bar为大图标,查找是否存在Ribbon控件. Bar 1,       ...

  8. DEV Express中NavBarCointrol的使用

    尚未对内容进行删减,内容有偏差和冗余,谨慎阅读. 发现在后面,写在前面: 13,之前在Default模式下,之所以很多Appearance属性都起不到作用,是因为Control的LookAndFeel ...

  9. DEV express 对Gridview某行的元素赋值

    1:获取选中的行某列的值 string colValue= this.gridView1.GetRowCellValue(this.gridView1.FocusedRowHandle, this.g ...

随机推荐

  1. SpringBoot之初体验

    一.SpringBoot 介绍 1.1 SpringBoot 使命 在之前我们学习 Spring 时,我们了解到 Spring 最根本的使命就是 简化Java开发.而 SpringBoot 的出现也有 ...

  2. 绑定class -vue

    1.值为对象 :class = "{ 'text-red': isActive }" data () { return { isActive : true } } :class = ...

  3. Python---进阶---logging---logger

    一.####用logging的四大组件来实现日志的功能 - 打印出函数执行的时间,日志的等级,日志的消息 - 用装饰器 - 不同的日志,要记录不同等级的日志消息 ------------------- ...

  4. 【宝藏】题解(五校联考3day1)

    分析 如果打爆搜的话可以拿60分. 首先知道期望是可以累加的,即i通过j去到k的期望,等于i去到j的期望加j去到k的期望. 所以令d[i]表示i的出度,F[i]表示从i到i的父亲的期望,G[i]表示i ...

  5. 【leetcode】Smallest Rotation with Highest Score

    题目如下: Given an array A, we may rotate it by a non-negative integer K so that the array becomes A[K], ...

  6. 【leetcode】802. Find Eventual Safe States

    题目如下: 解题思路:本题大多数人采用DFS的方法,这里我用的是另一种方法.我的思路是建立一次初始值为空的safe数组,然后遍历graph,找到graph[i]中所有元素都在safe中的元素,把i加入 ...

  7. 面试题常考&必考之--js中的对象的浅拷贝和深拷贝(克隆,复制)(下)

    这里主要是讲深拷贝: 深拷贝:个人理解就是拷贝所有的层级 1.像对象里再放数组和对象这些叫引用值.开始我们先判断大对象中是否有引用值(数组和小对象), 然后在判断引用值是数组还是对象 2.开始啦: 1 ...

  8. [luogu]P1053 篝火晚会[数学][群论]

    [luogu]P1053 篝火晚会 题目描述 佳佳刚进高中,在军训的时候,由于佳佳吃苦耐劳,很快得到了教官的赏识,成为了“小教官”.在军训结束的那天晚上,佳佳被命令组织同学们进行篝火晚会.一共有n个同 ...

  9. rman备份/恢复

    全备脚本 cat rman_full.sh #!/bin/bash export ORACLE_BASE=/opt/oracle export ORACLE_HOME=$ORACLE_BASE/pro ...

  10. 利用python进行数据分析--numpy基础

    随书练习,第四章  NumPy基础:数组和矢量运算 # coding: utf-8 # In[1]: # 加注释的三个方法1.用一对"""括起来要注释的代码块. # 2. ...