- #region 初始化ListView
- EditViewColumnHeader ch = new EditViewColumnHeader( ListEditViewColumnStyle.Control );
- ch.Text = "名称";
- ch.Width = 100;
- listEditView1.AddColumns( ch );
- ch = new EditViewColumnHeader( ListEditViewColumnStyle.Control );
- ch.Text = "比较";
- ch.Width = 100;
- listEditView1.AddColumns( ch );
- ch = new EditViewColumnHeader( ListEditViewColumnStyle.Control );
- ch.Text = "取值";
- ch.Width = 100;
- listEditView1.AddColumns( ch );
- ch = new EditViewColumnHeader( ListEditViewColumnStyle.Control );
- ch.Text = "关系";
- ch.Width = 100;
- listEditView1.AddColumns( ch );
- #endregion 初始化ListView
- ListEditViewItem item1 = new ListEditViewItem();
- item1.AddSubItem( new ComboBox() );
- item1.AddSubItem( new ComboBox() );
- item1.AddSubItem( new ComboBox() );
- item1.AddSubItem( new ComboBox() );
- listEditView1.AddItem( item1 );
- item1 = new ListEditViewItem();
- item1.AddSubItem( new ComboBox() );
- item1.AddSubItem( new ComboBox() );
- item1.AddSubItem( new ComboBox() );
- item1.AddSubItem( new ComboBox() );
- listEditView1.AddItem( item1 );
- item1 = new ListEditViewItem();
- item1.AddSubItem( new ComboBox() );
- item1.AddSubItem( new ComboBox() );
- item1.AddSubItem( new ComboBox() );
- item1.AddSubItem( new ComboBox() );
- listEditView1.AddItem( item1 );
- this.Controls.Add(listEditView1);
效果图