前几天Jo Muncher's Blog上看到《VS2005的DataGridView 多维合并标题 功能拓展》的文章,对我制作DataGridView多表头大有帮助,并把代码进行了调试,发现还有问题。近日把VB代码修改成C#代码,并对部分BUG进行修改,最终还是把问题攻克了,效果比较理想。见下图

转:VS2005的DataGridView 多维合并标题 功能拓展

源代码如下:

HeaderUnitView.cs

转:VS2005的DataGridView 多维合并标题 功能拓展using System;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Collections;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Collections.Generic;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Data.Sql;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Text;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Drawing;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Drawing.Design;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Windows.Forms;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Windows.Forms.VisualStyles;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.ComponentModel;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.ComponentModel.Design;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.ComponentModel.Design.Serialization;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Diagnostics;
转:VS2005的DataGridView 多维合并标题 功能拓展
using System.Runtime.InteropServices;
转:VS2005的DataGridView 多维合并标题 功能拓展
转:VS2005的DataGridView 多维合并标题 功能拓展
namespace DataGridViewSampCs

 

HeaderUnitView.Designer.cs(修改Dispose事件中的代码,其它的不用修改)

        }

 

由于是Jo Muncher's 文章,这里不再多说了,如想知道更多,请点击下面连接。

http://blog.csdn.net/JoMuncher/archive/2007/11/02/1862977.aspx

相关文章: