随笔 - 654  文章 - 1  评论 - 76  阅读 - 319万
08 2013 档案
DataGridView自动行号
摘要:最近又用了一下DataGridView控件,需要显示行号,我们知道在.net中DataGridView控件默认是不显示行号(数据的记录行数)的,后来通过查资料发现可以在DataGridView控件的RowPostPaint事件里面写代码就可以了,具体例子如下:private void MaindataGridView_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.L 阅读全文
posted @ 2013-08-29 08:58 shaomine 阅读(1165) 评论(0) 推荐(1) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示