List<GridColumn> colList = new List<GridColumn>(); colList.Add(new GridColumn() { Caption = "设备编码", Field = nameof(DicDvc.DvcCode), DataType = typeof(string), Width = 100 }); colList.Add(new GridColumn() { Caption = "设备名称", Field = nameof(DicDvc.DvcName), DataType = typeof(string), Width = 200 }); colList.Add(new GridColumn() { Caption = "生产商", Field = nameof(DicDvc.DvcMfrName), DataType = typeof(string), Width = 100 }); colList.Add(new GridColumn() { Caption = "规格", Field = nameof(DicDvc.DvcStd), DataType = typeof(string), Width = 100 }); colList.Add(new GridColumn() { Caption = "所属单位", Field = nameof(DicDvc.DvcDeptName), DataType = typeof(string), Width = 80 }); colList.Add(new GridColumn() { Caption = "折旧方式", Field = nameof(DicDvc.DvcDeprtypCode), DataType = typeof(string), Width = 100 }); colList.Add(new GridColumn() { Caption = "其他", Field = nameof(DicDvc.DvcMemo), DataType = typeof(string), Width = 100, TextHAlign = Infragistics.Win.HAlign.Center }); dgvDicDevice.InitColumns(colList);