当前位置:编程学习 > C#/ASP.NET >>

Delphi 中dbgrid如何遍历一个字段中连续出现的值?

--------------------编程问答-------------------- 是不是要另外建一个对照的结构,然后再去判断 --------------------编程问答-------------------- 一点思路,我再研究研究,这个是列值为’W‘的变色;
var
  count:integer;
  ARedStyle:TcxStyle;
count := 0;
ARedStyle := TcxStyle.Create(Self);
ARedStyle.Color := $0000FF;
with master do
begin
  first;
  while not master.eof do
  begin
    if master.fieldbyname('列字段名').asstring = 'w' then
    master.GetColumnByFieldName('列字段名').Styles.Content := ARedStyle;
    inc(count);
    next;  
  end;
end;
补充:.NET技术 ,  其他语言
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,