根据网上资料,进行实操后,得到上图,觉得还是挺不错的,
namespace MultiColHeaderDgvTest
{
partial class FrmTest
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Node1");
System.Windows.Forms.TreeNode treeNode1_1 = new System.Windows.Forms.TreeNode("Node1_1", new System.Windows.Forms.TreeNode[] {
treeNode1});
System.Windows.Forms.TreeNode treeNode1_2 = new System.Windows.Forms.TreeNode("treeNode1_2", new System.Windows.Forms.TreeNode[] {
treeNode1_1 });
System.Windows.Forms.TreeNode treeNode1_3 = new System.Windows.Forms.TreeNode("treeNode1_3", new System.Windows.Forms.TreeNode[] {
treeNode1_2 });
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Node2");
System.Windows.Forms.TreeNode treeNode2_1 = new System.Windows.Forms.TreeNode("treeNode2_1", new System.Windows.Forms.TreeNode[] {
treeNode2});
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("treeNode3");
System.Windows.Forms.TreeNode treeNode3_1 = new System.Windows.Forms.TreeNode("treeNode3_1", new System.Windows.Forms.TreeNode[] {
treeNode3 });
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("treeNode4");
System.Windows.Forms.TreeNode treeNode4_1 = new System.Windows.Forms.TreeNode("treeNode4_1", new System.Windows.Forms.TreeNode[] {
treeNode4});
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("treeNode5");
System.Windows.Forms.TreeNode treeNode5_1 = new System.Windows.Forms.TreeNode("treeNode5_1", new System.Windows.Forms.TreeNode[] {
treeNode5});
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("treeNode6");
System.Windows.Forms.TreeNode treeNode6_1 = new System.Windows.Forms.TreeNode("treeNode6_1", new System.Windows.Forms.TreeNode[] {
treeNode6});
System.Windows.Forms.TreeNode treeNode6_2 = new System.Windows.Forms.TreeNode("treeNode6_2", new System.Windows.Forms.TreeNode[] {
treeNode6_1});
System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("treeNode6");
System.Windows.Forms.TreeNode