`

CXGrid控件整行变颜色

 
阅读更多

 

CXGrid控件整行变颜色

当某行符合条件的时候,给它变色:

 

 

 

 

  if not VarIsNull(AViewInfo.GridRecord.Values[TcxGridDBTableView(Sender).GetColumnByFieldName('Status').Index]) then
    if AViewInfo.GridRecord.Values[TcxGridDBTableView(Sender).GetColumnByFieldName('Status').Index] = '选中' then
    begin
      ACanvas.Canvas.Font.Color := clBlack;
      ACanvas.Brush.Color := clRed;
    end;

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics