作者:习践无界
写作日期:2020-01-07

var Column: TcxGridDBColumn;
clmStyle: TCxStyle;


Column := cxGrid1DBTableView1.CreateColumn;
Column.Name:=xxx;
Column.Caption := xxx;
Column.DataBinding.FieldName :=xxx;
Column.DataBinding.ValueType:=‘Variant’; //设置字体颜色

clmStyle:=tcxstyle.Create(Self);
//动态根据数据库配置表加载颜色信息
clmStyle.TextColor:=StringToColor(FieldValues[‘FontColor’]) ;

Column.Styles.Content:= clmStyle;


注:数据库配置表加载颜色信息如下图

cxgrid设置列字体颜色

相关文章:

  • 2022-03-02
  • 2022-01-21
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-07
  • 2022-02-21
  • 2022-12-23
  • 2021-12-10
  • 2021-08-18
  • 2021-12-06
相关资源
相似解决方案