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 ...
随机推荐
- hdu 1567 2006 (题意理解容易出错)
#include<stdio.h> #include<vector> #include<algorithm> using namespace std; struct ...
- IOS底层数据结构--class
一.类的数据结构 Class(指针) typedef struct objc_class *Class; /* 这是由编译器为每个类产生的数据结构,这个结构定义了一个类.这个结构是通过编译器在执行时产 ...
- 当前主流的安卓APP开发IDE
什么是主流的开发安卓APP的方式? 我是去年4月份接触的Android开发,因此特别有感触,可以明显的感受到安卓APP主流开发方式的改变. 去年,2015年年初,各大安卓开发群大部分大牛在用Eclip ...
- Phalanx--hdu2859(dp 最大对称子图)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2859 题意就是给你一个n*n的字符矩阵,从中选出一个最大的子矩阵(m*m)满足关于斜对角线(左下角到右 ...
- ISO 8601
ISO 8601 國際標準化組織的国际标准ISO 8601是日期和时间的表示方法,全称为<数据存储和交换形式·信息交换·日期和时间的表示方法>.目前是第三版ISO8601:2004以替代第 ...
- 堆的 两种实现 (数组和STL)
基本思想: 两种操作都跟树的深度成正比,所以复杂度 O(log(n)) ; push():在向堆中插入数值时,首先在堆的末尾插入该数值,然后不断向上提直到没有大小颠倒为止. pop(): 从堆中取出 ...
- asp开发微信扫码支付
这个任务已经给了.现在正在学习开发中.主要注意的是2点. 1:返回参数的验证. 2:通知后业务处理和处理后返回财付通.大部分操作,api中已经处理好. 现在需要的业务逻辑部分. 需要正确3个参数 r ...
- [POJ2002]Squares(计算几何,二分)
题目链接:http://poj.org/problem?id=2002 给定一堆点,求这些点里哪些点可以构成正方形,题目给定n<=1000,直接枚举四个点是肯定会超时的,因此要做一些优化. 有公 ...
- [HDOJ1078]FatMouse and Cheese(记忆化搜索)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1078 题意:给出n, k,然后给出n*n的地图,(下标0~n-1),有一只老鼠从(0,0)处出发,只能 ...
- 2016MBA排名
2016全球商学院100强 2016上半年度最受欢迎的十大MBA排名 网上评选出上年度最受欢迎的十大MBA排名,有你想要报考的院校吗?快来一睹这些MBA院校的风采,选择好适合自己的院校项目. 第1名 ...