DevExpress学习之DevExpress.XtraGrid.Columns.GridColumn
当用到DevExpress中的DevExpress.XtraGrid.Columns.GridColumn列时,会根据数据来设置其属性。
列的读写属性可见:http://hi.baidu.com/cegqqmfzptacexe/item/71ad1f30f430de9bb80c031b
代码如下:
DDataGridView dataGridView; DevExpress.XtraGrid.Columns.GridColumn colSensorName = new DevExpress.XtraGrid.Columns.GridColumn(); colSensorName.Caption = "测点名称"; colSensorName.FieldName = "SensorName"; colSensorName.VisibleIndex = 2; colSensorName.Width = 100;// colSensor_ID.OptionsColumn.FixedWidth = true; colSensorName.OptionsColumn.AllowEdit = false;//设置只读 dataGridView.Columns.Add(colSensorName);
在编程的过程中,只有不断的尝试才能达到最佳的效果,这就是开发……