用SQL数据库,DBGrid表格有多个记录,
怎样用程序实现所操作记录行区别其他行(用颜色或字体格式)
~~ 谢谢
怎样用程序实现所操作记录行区别其他行(用颜色或字体格式)
~~ 谢谢
解决方案 »
- 关于数据集显示问题
- 放分200恭喜 ARI 做版主 -- 修罗
- 怎么去掉,数据库读入memo框中输入的字符串换行时自动加的逗号?
- 要输入的参数如何一次输入自动分开比如代理和端口在ie是分开的,在其它软件可以一次多个输入
- 用了多年VB的人用Delphi写的程序,欢迎测试
- 请教问题啊!进者有分!
- 悬案------如果在98下注册这个.dll的话,打开的所有IE窗口在任务栏上的小窗口都消失了!!!
- 如何在dbgrid中显示数据!!!!!
- delphi xe3中BusinessSkinForm 10.31 Ribbon使用问题,谁有demo,着急!!!!!
- 如何对ACCESS数据库进行压缩,各位老兄,救命啊!
- 非常奇怪的问题,关于FLASH的,有兴趣的大虾可以侃侃.....
- 怎样提高打印质量的问题?(急,在线等待)
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
if dbgrid1.DataSource.DataSet.FieldByName('出库单编号').asstring = '合计' then
DBGrid1.Canvas.Font.Color := clRed;
if dbgrid1.DataSource.DataSet.FieldByName('出库单编号').asstring = '小计' then
DBGrid1.Canvas.Font.Color := clRed;
if dbgrid1.DataSource.DataSet.FieldByName('红蓝标记').asinteger = -1 then
DBGrid1.Canvas.Font.Color := clRed;
DBGrid.canvas.Brush.color:=clYellow;//行的颜色!
DBGrid1.DefaultDrawDataCell(Rect, Field, State);
end;
const Rect: TRect; Field: TField; State: TGridDrawState);
begin
if adotable1.Fields[17].Value then //如果选中则~[17].Value=`1`
DBGrid1.Canvas.Font.Color := clRed;
DBGrid1.canvas.Brush.color:=clYellow;//行的颜色!
DBGrid1.DefaultDrawDataCell(Rect, Field, State);
end;
为什么不行啊?
我是新手希望大家多多帮助 谢谢哦