请问高手如何在DBGrid控件中灰化显示一条记录,在线等待!!! 请问高手如何在DBGrid控件中灰化显示一条记录,如不行,有没有其它显示数据库的控件可实现。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这里有答案:http://expert.csdn.net/Expert/topic/1727/1727167.xml?temp=.4215662 在DBGrid1的onDrawColumnCell添加如下代码procedure TForm_Init.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);beginif (Form1.ADOTable2.FieldByName('id').AsInteger=2) then begin DBGrid1.Canvas.Brush.Color:=clGray; end; DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);end; delphi 有没有随文字多少自动撑起来的表格 C代码转换成delphi的问题,用到了直接读写内存地址 请教一个学生管理系统的问题 请教Delphi中公式的的转化: 各位好! SQL问题 各位大师!!救我呀! 求助反三角函数,就是直角三角形中,已知两边求角度的函数 怎样判断一个小数是不是两位小数啊? 各位朋友给个建议(来的都有分) 要读注册表中的数据,已下程序那有错,请高手指点! 有关Web App Debugger 的问题,200分求教! 如何确定Tmemo的行距
http://expert.csdn.net/Expert/topic/1727/1727167.xml?temp=.4215662
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if (Form1.ADOTable2.FieldByName('id').AsInteger=2) then
begin
DBGrid1.Canvas.Brush.Color:=clGray;
end;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;