| | |
| | | //编辑事件 |
| | | gvMx1.CellValueChanged += GvMx1_CellValueChanged; |
| | | //取消不符合条件的编辑 |
| | | // gvMx1.ShowingEditor += GvMx1_ShowingEditor; |
| | | gvMx1.ShowingEditor += GvMx1_ShowingEditor; |
| | | //禁用样本数之外的单元格且改变颜色 |
| | | gvMx1.CustomDrawCell += GvMx1_CustomDrawCell; |
| | | getModel(); |
| | |
| | | bool _bl = ckCol(e.Column.FieldName, _maxYbs); |
| | | if (_bl) |
| | | { |
| | | e.Appearance.BackColor = Color.Azure; |
| | | e.Appearance.BackColor = Color.LightBlue; |
| | | e.Appearance.ForeColor = Color.Blue; |
| | | e.Column.MinWidth = 50; |
| | | } |
| | | else |
| | |
| | | object value = gvMx1.GetRowCellValue(e.RowHandle, e.Column + "jg"); |
| | | if (value != null && value.ToString() == strBhg) |
| | | { |
| | | e.Appearance.ForeColor = Color.White; |
| | | e.Appearance.BackColor = Color.Red; |
| | | e.Appearance.ForeColor = Color.White; |
| | | }; |
| | | } |
| | | } |