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 ...
随机推荐
- tensorflow + pycharm安装即相关资料
1. tensorflow安装教程:https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#pip-installatio ...
- java--vo
VO是跟数据库里表的映射,一个表对应一个VO DAO是用VO来访问真实的表,对数据库的操作都在DAO中完成 BO是业务层,做逻辑处理的 VO , PO , BO , QO, DAO ,POJO, O/ ...
- Qt源代码分析
记下好文章,慢慢看,然后加上自己心得: http://www.cnblogs.com/hicjiajia/archive/2011/08/27/2155512.html Qt源码分析之信号和槽机制ht ...
- Redis的String操作
set key value [ex 秒数] / [px 毫秒数] [nx] /[xx] 如: set a 1 ex 10 , 10秒有效 Set a 1 px 9000 , 9秒有效 注: 如果ex, ...
- iOS:核心动画的详解介绍:CAAnimation(抽象类)及其子类
核心动画的详解介绍:CAAnimation(抽象类) 1.核心动画基本概念 Core Animation是一组非常强大的动画处理API,使用它能做出非常炫丽的动画效果,而且往往是事半功倍! 使用它 ...
- Android AlarmManager(全局定时器/闹钟)指定时长或以周期形式执行某项操作
AlarmManager的使用机制有的称呼为全局定时器,有的称呼为闹钟.通过对它的使用,个人觉得叫全局定时器比较合适,其实它的作用和Timer有点相似.都有两种相似的用法:(1)在指定时长后执行某项操 ...
- Intellij IDEA的Hibernate简单应用
1.创建数据库及其表 create database demo; use demo; CREATE TABLE `user` ( `id` int(10) unsigned NOT NULL ...
- ace-min.css
textarea,input[type="text"],input[type="password"],input[type="datetime&quo ...
- eclipse 中使用tomcat
最近写了个商品搜索模块,要做成tomcat服务,以前只关注算法,从来没有使用过tomcat,这次上网上查了些资料还搞定(小公司真是锻炼人啊,以前我从来不考虑这些服务问题). 1.tomcat 环境的搭 ...
- javascript 高效按字节截取字符串
做为一个前端开发人员在网页展示中经常会碰到,标题过长,需要截取字符串,用CSS的实现的话各种兼容问题,各种坑. 让后台程序截一下,又各种推托,让后台按字节截一下更是和要了后台老命一样,最后可能只会安字 ...