devexpress GridControl 行指示列图标绘制
2016-05-29 21:14
357 查看
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. |
How to change the row error icon which is displayed within a row indicator
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; } } }
相关文章推荐
- 杂谈:Electron
- 如何理解Gabor滤波器
- Linux中的计划任务-Crontab
- LeetCode-227.Basic Calculator II
- Bootstrap源码分析之transition、affix
- SWIFT中的repeat...while
- 全排列递归算法
- 强悍的命令行(三)
- dlopen、dlsym和dlclose的使用和举例
- maven搭建ssm分模块框架+activeMQ (myeclipse版) (四)
- 【leetcode】String——Substring with Concatenation of All Words(30)
- iOS开发frame, contentSize, contentOffset, contentInset 区别联系浅析
- 小组评分
- MEF入门之不求甚解,但力求简单能讲明白(三)
- MEF入门之不求甚解,但力求简单能讲明白(二)
- 学习进度表第十三周
- Angular JS 跨域
- JAVA WEB开发笔记
- c++多态
- 前端面试题整理【转】