datagridview的RowPostPaint事件
来源:互联网 发布:开机windows损坏的图像 编辑:程序博客网 时间:2024/06/03 17:47
在绘制 DataGridViewRow 后发生
可以单独处理此事件,也可以将它与 RowPrePaint 事件一起处理,以便自定义控件中行的外观。可以自己绘制整个行,也可以绘制行的特定部分并使用
- C# code
- private void dgvPackDetail_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { Color color = dgvPackDetail.RowHeadersDefaultCellStyle.ForeColor; if (dgvPackDetail.Rows[e.RowIndex].Selected) color = dgvPackDetail.RowHeadersDefaultCellStyle.SelectionForeColor; else color = dgvPackDetail.RowHeadersDefaultCellStyle.ForeColor; using (SolidBrush b = new SolidBrush(color)) { e.Graphics.DrawString((e.RowIndex + 1).ToString(), e.InheritedRowStyle.Font, b, e.RowBounds.Location.X + 12, e.RowBounds.Location.Y + 6); } }
在DataGridView行的Header上表示行号码
- datagridview的RowPostPaint事件
- 用DataGridView的RowPostPaint事件在RowHeaderCell中绘制行号
- 利用DataGridView 的 RowPostPaint 事件 和 CellFormatting 事件 对行划线
- DataGridView的回车事件
- DataGridView 控件编程的事件
- DataGridView的事件CellForMatting的定位
- DataGridView中ComboBox列的触发事件
- DataGridView.CellContentClick 事件的C#例子
- c#中datagridview的EditingControlShowing事件
- DataGridView.CellValidating 事件的VB.NET例子
- DataGridView中comboBox(DataGridViewComboBoxColumn)的事件编写
- winforms的datagridview双击事件传值
- Winform中DataGridView的复选框事件
- C#中,模拟DataGridView的CellClick事件
- DataGridView中comboBox(DataGridViewComboBoxColumn)的事件编写
- DataGridView CellForMatting事件 相当于GridView的RowBound
- C#中,模拟DataGridView的CellClick事件
- DataGridView的CellFormatting事件绑定判断
- Ant引入第三方jar遇到的问题
- webbrowers用法集
- UIUC同学Jia-Bin Huang收集的计算机视觉代码合集(ZZ)
- ajax技术示例
- insmod: error inserting './sctp.ko': -1 Unknown symbol in module
- datagridview的RowPostPaint事件
- 数据库连接整理
- linux shell判断条件和系统变量
- in与exists别乱用
- 使用fastdb的感受
- 网上找到的统计代码行数
- 计算机视觉领域的一些牛人博客,超有实力的研究机构等的网站链接
- wince下EBOOT详解
- 第十四周任务二指针链表