[WinForm]重绘DataGridView的序号

来源:互联网 发布:郑凯淘宝店叫什么 编辑:程序博客网 时间:2024/05/19 13:55

        private void datagv_det_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)        {            SolidBrush b = new SolidBrush(this.datagv_det.RowHeadersDefaultCellStyle.ForeColor);            e.Graphics.DrawString((e.RowIndex + 1).ToString(System.Globalization.CultureInfo.CurrentUICulture),             this.datagv_det.DefaultCellStyle.Font, b, e.RowBounds.Location.X + 20, e.RowBounds.Location.Y + 4);        }


原创粉丝点击