devexpress GridControl 行指示列图标绘制
Row Indicator Panel
The row indicator panel represents a region displayed at the left edge of the View. The panel contains row indicator cells corresponding to different View sections (the band header panel, the column header panel, data rows, the View footer, etc). The cell relating to the focused row indicates the row state (whether it is in edit mode or has been modified, etc.). When multiple selection is enabled, end-users can click cells and then drag the mouse cursor to another cell to select a range of rows.

The following icons can be displayed within an indicator panel.
- Focused row.
- The focused cell's in-place editor is active.
- The focused row is modified.
- The focused row is a New Item Row.
- The focused row is an Auto Filter Row.
- Indicates the button used to maximize a detail View.
- Indicates the button used to restore a detail View.
- The focused row contains errors.
- A non-focused row contains errors.
The table below lists the main properties affecting element appearance.
| Appearance | The GridViewAppearances.HeaderPanel property specifies appearance settings used for painting all indicator cells, except for the cell relating to the band header panel. This cell is painted using the BandedViewAppearances.BandPanel property's settings.
An element's background colors cannot be changed when a View is painted using the Windows XP, Office2003, or any skinning paint style (see the BaseView.PaintStyleNameproperty). |
| Custom Draw Event | The GridView.CustomDrawRowIndicator event. |
| Visibility | The GridOptionsView.ShowIndicator option. |
| Width | The GridView.IndicatorWidth property. |
private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) {
if (e.Info.IsRowIndicator){
DataRow row = gridView1.GetDataRow(e.RowHandle);
if (row != null && row.RowError != String.Empty) {
e.Info.ImageIndex = -1;
e.Painter.DrawObject(e.Info);
Rectangle r = e.Bounds;
r.Inflate(-1, -1);
int x = r.X + (r.Width - imageList1.ImageSize.Width) / 2;
int y = r.Y + (r.Height - imageList1.ImageSize.Height) / 2;
e.Graphics.DrawImageUnscaled(imageList1.Images[0], x, y);
e.Handled = true;
}
}
}
devexpress GridControl 行指示列图标绘制的更多相关文章
- 在DevExpress GridControl的一列中显示图片
作者:jiankunking 出处:http://blog.csdn.net/jiankunking 近期做项目的时候用到了将GridControl中一列设置为PictureEdit类型,然后通过这一 ...
- DevExpress GridControl 后台设置列
/// <summary> /// 初始化GridView /// </summary> /// <param name="gv">GridVi ...
- C# devExpress GridControl 行中行 子行 多级行
在工作中经常会碰到需要做行中行,多级行的情况,不熟的情况下,我也只能试着实现. 命名空间 using DevExpress.XtraEditors.Repository; using System.D ...
- DevExpress GridControl 显示外部图片
如果数据源中只包含图片的链接,如何在DevExpress GridControl的一列中显示外部图片? 要实现该功能,可通过非绑定列的方式来实现.具体实现方法如下: 1. 创建了一个非绑定列并设 ...
- [DevExpress]GridControl 列头绘制Checkbox
关键代码: /// <summary> /// 为列头绘制CheckBox /// </summary> /// <param name="view" ...
- DevExpress GridControl 显示行号、设置行号宽
显示行号类 /// <summary> /// GridView 显示行号 设置行号列的宽度 /// </summary> /// <param name="g ...
- DevExpress实现根据行,列索引来获取RepositoryItem的方法
/// <summary> /// 根据行,列索引来获取RepositoryItem /// </summary> /// <param name="view& ...
- DevExpress GridControl使用(转)
DevExpress GridControl使用 (一)原汁原味的表格展示 Dev控件中的表格控件GridControl控件非常强大.不过,一些细枝末节的地方有时候用起来不好找挺讨厌的.使用过程中,多 ...
- DEVexpress GridControl 属性设置
1. 如何解决单击记录整行选中的问题 View->OptionsBehavior->EditorShowMode 设置为:Click 2. 如何新增一条记录 (1).gridView.Ad ...
随机推荐
- 多线程系列 线程池ThreadPool
上一篇文章我们总结了多线程最基础的知识点Thread,我们知道了如何开启一个新的异步线程去做一些事情.可是当我们要开启很多线程的时候,如果仍然使用Thread我们需要去管理每一个线程的启动,挂起和终止 ...
- Shell练习 验证号码
原文: https://leetcode.com/problems/valid-phone-numbers/ Given a text file file.txt that contains list ...
- Java-马士兵设计模式学习笔记-观察者模式-OOD线程
一.概述 1.情景:孩子睡觉,醒后要吃东西,用java模拟此情况 2.设计:child类,Dad类,都继承Runnable,dad线程监视child线程(缺点:因为要监视,所以耗cup资源) 二.代码 ...
- C#之你懂得的序列化/反序列化
前言:写此文章一方面是为了巩固对序列化的认识,另一方面是因为本人最近在面试,面试中被问到“为什么要序列化”.虽然一直在使用,自己也反复的提到序列化,可至于说为什么要序列化,还真的没想过,所以本文就这样 ...
- libevent 定时器timer
libevent是一个基于事件触发的网络库,memcached底层也是使用libevent库. 总体来说,libevent有下面一些特点和优势:* 事件驱动,高性能:* 轻量级,专注于网络: * 跨平 ...
- POJ 2689 Prime Distance (素数+两次筛选)
题目地址:http://poj.org/problem?id=2689 题意:给你一个不超过1000000的区间L-R,要你求出区间内相邻素数差的最大最小值,输出相邻素数. AC代码: #includ ...
- Sass&Compass学习笔记(一)
1.sass中可以使用变量 变量名以$符号开头,可包含所有可用作CSS类名的字符,包括下划线和中划线. 可见,中划线也是可以作为命名的字符,这是与很多其他语言的不同之处.变量的使用实例: $compa ...
- 【linux】/dev/null与/dev/zero详解【转】
转自:http://www.cnblogs.com/xianghang123/archive/2012/03/23/2413381.html 使用/dev/null 把/dev/null 看作&quo ...
- [JWFD开源工作流]JWFD开源工作流官方下载内容更新
在更新版的JWFD二次开发包中,我正在实现单线程的时钟控制器,动了下引擎的源代码,这个更新包主要是升级界面,内核代码,大家就不用升级了.. 代码提示: 请修改代码包中(org.jwfd.workflo ...
- static_cast 和 dynamic_cast 的区别
static_cast一般用来将枚举类型转换成整型,或者整型转换成浮点型.也可以用来将指向父类的指针转换成指向子类的指针.做这些转换前,你必须确定要转换的数据确实是目标类型的数据,因为static_c ...