一个大难题??? 从数据库中读出数据放入cxGrid中显示,其中有一列是标志列,以0、1、2在数据库中存放,但我想让它以文字方式显示,0时显示“否”,1时显示“是”,2是显示“已删除”,这样怎么做呢??? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在table(或query)的相应字段的OnGetText事件(右击table-->fields editer-->add fields)中这样写:procedure TForm1.TableFieldnameGetText(Sender: TField; var Text: String; DisplayText: Boolean);begin case sender.Value of 0: text:='无'; 1: text:='有'; 2: text:='已删!'; end;end;//其实楼主只要细心在论坛搜一下就会找到这答案. 这也不是我写的,只是我看到过的 cxGrid的Column有自带的很全的功能.column--->properties--->radio group--->columns = 3 ---> Value 0 , Caption 无Value 1, Caption 有Value 2, Caption 已删除 但是显示几个radio总是觉得难看 delphi 通过modem实现拨打固话,有Tapi相关的控件吗? 用ADO打开dbf,如何实现两个不同路径下的dbf文件的关联?请高手帮忙! 关于插入外部表的SQL(有一定难度哦) 关于目录的删除(在线急等) 写个了软件,放点分庆贺一下。 哭死啊!谁能指点我一下,我把分全给他。 转贴!---->Delphi常用快捷键 高分(100分)求助一个DELPHI程序 shellexecute()函数怎么在delphi中使用! 参数问题,高手帮忙啊 Delphi可以写USB驱动程序吗? cxgrid 滚动问题;
procedure TForm1.TableFieldnameGetText(Sender: TField; var Text: String;
DisplayText: Boolean);
begin
case sender.Value of
0: text:='无';
1: text:='有';
2: text:='已删!';
end;
end;//其实楼主只要细心在论坛搜一下就会找到这答案. 这也不是我写的,只是我看到过的
column--->properties--->radio group--->columns = 3 ---> Value 0 , Caption 无
Value 1, Caption 有
Value 2, Caption 已删除