简单帐表每个单元格颜色如何设置
金蝶云社区-云小爱
云小爱
2人赞赏了该文章 4,978次浏览 未经作者许可,禁止转载编辑于2015年04月24日 14:11:01

简单帐表每个单元格颜色如何设置
public override void OnFormatRowConditions(Kingdee.BOS.Core.Report.PlugIn.Args.ReportFormatConditionArgs args)
{
base.OnFormatRowConditions(args);
FormatCondition fc = new FormatCondition();
//fc.ApplayRow = false;
if (args.DataRow.ColumnContains("供应商") && args.DataRow["供应商"].ToString().Trim().Length > 0)//
{
fc.BackColor = "#0000FF";// 背景色蓝色;
}
if (args.DataRow.ColumnContains("fsupplyname") && args.DataRow["fsupplyname"].ToString().Trim().Length > 0)//
{
fc.BackColor = "#DC143C";// 背景色猩红;
fc.ForeColor = "#0000FF";
}
args.FormatConditions.Add(fc);

}

这个只能设置行的背景和前景,有没有只设置单元格的背景和前景呢?

您的鼓励与嘉奖将成为创作者们前进的动力,如果觉得本文还不错,可以给予作者创作打赏哦!

请选择打赏金币数 *

10金币20金币30金币40金币50金币60金币
可用金币: 0