让DataGridView显示行号
来源:互联网 发布:淘宝旺铺模板 编辑:程序博客网 时间:2024/05/01 20:05
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
...{
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
e.RowBounds.Location.Y,
dataGridView1.RowHeadersWidth - 4,
e.RowBounds.Height);
TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(),
dataGridView1.RowHeadersDefaultCellStyle.Font,
rectangle,
dataGridView1.RowHeadersDefaultCellStyle.ForeColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
}
...{
Rectangle rectangle = new Rectangle(e.RowBounds.Location.X,
e.RowBounds.Location.Y,
dataGridView1.RowHeadersWidth - 4,
e.RowBounds.Height);
TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(),
dataGridView1.RowHeadersDefaultCellStyle.Font,
rectangle,
dataGridView1.RowHeadersDefaultCellStyle.ForeColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
}
- 让DataGridView显示行号
- 让DataGridView显示行号
- 让DataGridView显示行号
- 让DataGridView显示行号
- 让DataGridView显示行号
- 让DataGridView显示行号
- 让DataGridView显示行号
- 让DataGridView显示行号,去除空记录行
- winForm中让DataGridView显示行号,去除空记录行
- DataGridView显示行号
- [转]DataGridView显示行号
- WinForm DataGridView 显示行号
- DataGridView显示行号
- dataGridView 显示行号
- datagridview中显示行号
- datagridview显示行号
- C# datagridview显示行号
- 在DataGridView中显示行号
- DateView,隐藏列,DataFormatString, 格式
- opener与parent的区别
- 使用 js + button标签 模拟 select 列表框 操作 By shawl.qiu
- sleep
- Oracle价格
- 让DataGridView显示行号
- asp错误提示
- 算24的程序
- class文件的反编译
- 搜索引擎原理
- 为可变而设计
- struts的web.xml里配置编码转换过滤器
- 数据加密算法
- 软件介绍: AFEPack 软件 (李若, 刘文斌)