2013年8月29日
摘要: 最近又用了一下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 阅读(1161) 评论(0) 推荐(1) 编辑