概念
TcxCustomGridTableView:表格
TcxGridDBColumn:表格列
TcxGridTableDataCellViewInfo:数据集
实例1:表格列新增颜色
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
procedure Tfrm_ICLYMT01.grd_detDBTableView1movd_partCustomDrawCell( Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); var col: TcxGridDBColumn; begin inherited; //工具类物料 颜色 if AViewInfo.Selected then exit; col := GetColumnByName(grd_det, 'gend_property13'); if (AViewInfo.GridRecord.Values[col.Index] = 'Y') then begin ACanvas.Font.Color := clblue; if not movd_det.IsEmpty then Fset := true; end else ACanvas.Font.Color := clBlack; end;