h(Exception ex) { //empty catch } finally { // make sure the base class gets called to do the drawing with // the possibly changed brushes base.Paint(g, bounds, source, rowNum, backBrush, foreBrush, alignToRight); } } } 使用的例子 DataGridColoredTextBoxColumn colExceptionType = new DataGridColoredTextBoxColumn(); colItemType.BindingDataView = dtOrderItem.DefaultView; //将table的view赋值 colItemType.HeaderText =“ItemTyp页码:[1] [2] [3] [4] [5] 第4页、共5页 |