您的位置:首页 > 其它

Cxgrid根据列条件改变行颜色

2014-06-05 11:10 302 查看
procedure TFrm_ListBaseForm4InStock.cxGridListCustomDrawCell(

  Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;

  AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);

var

  i : Integer;

begin

  i := AViewInfo.GridView.FindItemByName('cxGridListColumn15').Index;

  if AViewInfo.GridRecord.Values[i]  = 0 then

    if SameText(AViewInfo.Item.Name, 'cxGridListColumn15') then //判断只显示一个单元格 去掉显示整行

      ACanvas.Font.Color := clred;

end;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: