现有这样的一个表格:
序号 姓名 性别 职务 工作经历 毕业院校
1 王 男 项目经理 3 某学校毕业
2 张 男 项目经理 4 某学校毕业
3 李 男 技术员 2 某学校毕业
4 赵 女 技术员 1 某学校毕业如何使两行项目经理和两行技术员显示不同的颜色呢?
序号 姓名 性别 职务 工作经历 毕业院校
1 王 男 项目经理 3 某学校毕业
2 张 男 项目经理 4 某学校毕业
3 李 男 技术员 2 某学校毕业
4 赵 女 技术员 1 某学校毕业如何使两行项目经理和两行技术员显示不同的颜色呢?
解决方案 »
- 创建窗体时提示'The window does not have scroll bars 错误怎么解决?
- tchart中制图问题
- 南京七月飞雪 专家表示惊讶称夏天下雪闻所未闻(转帖)
- <<inside VCL>> 的疑问??
- 知道Borland为什么会衰败吗?
- 如何读取16进制文件并转换成整数
- C中有变量声明与定义的区别,Pascal中有吗?
- **DockPresident**,世界上功能最强大的停靠(Docking)控件,超级酷,支持多种停靠风格,拥有了她,您就可以作出Visual C++,Visual Inter
- combobox的问题
- 动态报表制作
- 高手请进,由两个adodataset,产生另外一个adodataset,该怎么办?
- 是delphi 的功能限制还是bug?
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if Column.Grid.Fields[3].AsString = '项目经理' then
Begin
DBGrid1.Canvas.Font.Color := clRed;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end else
Begin
DBGrid1.Canvas.Font.Color := clblack;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
end;
select count(distinct sfzh) as AmountSfzh from /*身份证号重复人员的净个数*/
(select xm,xb,sfzh,gzdw,'项目经理表' as ssbg from xmjlb
union all
select xm,xb,sfzh,gzdw,'监理人员表' from jl_rydab
union all
select xm,xb,sfzhm,gzdw,'施工企业有职称人员表' from Qyyzcryb
) as d
where sfzh in
(select sfzh from (select sfzh from xmjlb
union all
select sfzh from jl_rydab
union all
select sfzhm from Qyyzcryb
) as c
group by sfzh having count(sfzh)>1 )
在前台就判断这条记录的这个计数器是否>2如果是就输出不同颜色来.
Begin
DBGrid1.Canvas.Font.Color := clRed;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end else
begin
.....
end;