首先我们先来看下效果
页面随窗体大小 自动调整大小
重写的DataGirdView 源码
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing.Drawing2D;
using System.Drawing;
using System.Windows.Forms;
namespace 流水
{
/// <summary>
/// 自定义DataGridView控件
/// </summary>
public class testDataGirdView:System.Windows.Forms.DataGridView
{
#region 重绘Column、Row
int _RowHeadWidth = 41;
/// <summary>
/// 重绘Column、Row
/// </summary>
/// <param name="e"></param>
protected override void On