• 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 行指示列图标绘制的更多相关文章

  1. 在DevExpress GridControl的一列中显示图片

    作者:jiankunking 出处:http://blog.csdn.net/jiankunking 近期做项目的时候用到了将GridControl中一列设置为PictureEdit类型,然后通过这一 ...

  2. DevExpress GridControl 后台设置列

    /// <summary> /// 初始化GridView /// </summary> /// <param name="gv">GridVi ...

  3. C# devExpress GridControl 行中行 子行 多级行

    在工作中经常会碰到需要做行中行,多级行的情况,不熟的情况下,我也只能试着实现. 命名空间 using DevExpress.XtraEditors.Repository; using System.D ...

  4. DevExpress GridControl 显示外部图片

    如果数据源中只包含图片的链接,如何在DevExpress GridControl的一列中显示外部图片? 要实现该功能,可通过非绑定列的方式来实现.具体实现方法如下: 1.    创建了一个非绑定列并设 ...

  5. [DevExpress]GridControl 列头绘制Checkbox

    关键代码: /// <summary> /// 为列头绘制CheckBox /// </summary> /// <param name="view" ...

  6. DevExpress GridControl 显示行号、设置行号宽

    显示行号类 /// <summary> /// GridView 显示行号 设置行号列的宽度 /// </summary> /// <param name="g ...

  7. DevExpress实现根据行,列索引来获取RepositoryItem的方法

    /// <summary> /// 根据行,列索引来获取RepositoryItem /// </summary> /// <param name="view& ...

  8. DevExpress GridControl使用(转)

    DevExpress GridControl使用 (一)原汁原味的表格展示 Dev控件中的表格控件GridControl控件非常强大.不过,一些细枝末节的地方有时候用起来不好找挺讨厌的.使用过程中,多 ...

  9. DEVexpress GridControl 属性设置

    1. 如何解决单击记录整行选中的问题 View->OptionsBehavior->EditorShowMode 设置为:Click 2. 如何新增一条记录 (1).gridView.Ad ...

随机推荐

  1. Linux下面如何安装Django

    首先你需要肯定你的机子上装了Python 现在ubuntu已经自带,所以不必操心 当然你可以在你的机子下测试一下,只需在 terminal 下输入 python 如果出现下面的界面就说明你机子已经装了 ...

  2. ARM菜鸟:JLINK与JTAG的区别

    调试ARM,要遵循ARM的调试接口协议,JTAG就是其中的一种.当仿真时,IAR.KEIL.ADS等都有一个公共的调试接口,RDI就是其中的一种,那么我们如何完成RDI-->ARM调试协议(JT ...

  3. [转]应聘Java,jsp,j2ee软件工程师笔试中可能出现的问题

    相信大家应聘的时候第一关就是笔试,即使是一位很有经验的工程师也不一定能够顺利通过,笔试不好,可能就无法进行面试,即使能够进行面试,考官对你的印象也不会很好,问的问题也会很多,估计很难吃的消,当然如果你 ...

  4. 如何在Java客户端调用RESTful服务

    在这个例子中,我们将看到如何使用java.net包实用工具,创建一个访问REST服务RESTful的客户端.当然这不是创建一个RESTful客户端最简单的方法,因为你必须自己读取服务器端的响应,以及J ...

  5. 【总结】Java线程同步机制深刻阐述

    原文:http://hxraid.iteye.com/blog/667437 我们可以在计算机上运行各种计算机软件程序.每一个运行的程序可能包括多个独立运行的线程(Thread). 线程(Thread ...

  6. Git工作流指南:Gitflow工作流 Comparing Workflows

    Comparing Workflows The array of possible workflows can make it hard to know where to begin when imp ...

  7. c# 获取字符串数组中最长的的字符串并输出最长的字符串

    求字符串数组中最大长度的字符串: 实质就是比较字符串的长度: 方案一: class Program { static void Main(string[] args) { string[] array ...

  8. 使用 DB Fixtures 为 Unit Test 提供基础数据,Sails + Mocha 实现。

    使用 DB Fixtures 为 Unit Test 提供基础数据,Sails + Mocha 实现. 问题:Test Fixture 太分散,管理麻烦. 在做单元测试的时候,数据回滚是个比较麻烦的问 ...

  9. BZOJ 3172 单词(ac自动机)

    题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=3172 题意:给出n个单词.输出每个单词在所有单词中一共出现多少次? 思路:首先将所有单词 ...

  10. Qt之密码框不可选中、复制、粘贴、无右键菜单等

    简述 在做用户登录.修改密码的时候,往往会用到密码框,其中一些功能要求与普通的输入框不同,例如:不能选中.复制.粘贴.无右键菜单等功能,当然设置密码不可见是必须的! 下面介绍两种方式来实现相同的效果. ...