bandedGridView
bandedGridView1 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridView();
this.gridControl1 = new DevExpress.XtraGrid.GridControl(); this.bandedGridView1 = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridView();/* 创建BandedGridView对象 */ this.bdgcolID = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();/* 创建列 */ this.bdgcolName = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();/* */ this.bdgcolPhoto = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();/* */ this.bdgcolPhotoName = new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn();/* */ this.gridBand1 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();/* 创建列头分组 */ this.gridBand2 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();/* */ this.gridBand3 = new DevExpress.XtraGrid.Views.BandedGrid.GridBand();/* */ ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bandedGridView1)).BeginInit(); this.SuspendLayout();
bandedGridView1 添加分组 GridBand
// // bandedGridView1 // this.bandedGridView1.Bands.AddRange ( new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] { this.gridBand1 } );
添加分组 以及分组添加列
// // gridBand1 // this.gridBand1.Caption = "上等"; /* 分组 添加 子分组 */ this.gridBand1.Children.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] { this.gridBand2,this.gridBand3}); this.gridBand1.MinWidth = 16; this.gridBand1.Name = "gridBand1"; this.gridBand1.VisibleIndex = 0; this.gridBand1.Width = 472; // // gridBand2 // this.gridBand2.Caption = "违规"; /*子分组 添加 数据列*/ this.gridBand2.Columns.Add(this.bdgcolID); this.gridBand2.MinWidth = 12; this.gridBand2.Name = "gridBand2"; this.gridBand2.VisibleIndex = 0; this.gridBand2.Width = 118; // // gridBand3 // this.gridBand3.Caption = "是否感叹号"; /*子分组 添加 数据列*/ this.gridBand3.Columns.Add(this.bdgcolName); this.gridBand3.Columns.Add(this.bdgcolPhoto); this.gridBand3.Columns.Add(this.bdgcolPhotoName); this.gridBand3.Name = "gridBand3"; this.gridBand3.VisibleIndex = 1; this.gridBand3.Width = 354;