delphi 清空dbgrd和StringGrid


本文整理自网络,侵删。

 
界面中有dbgrd和StringGrid,做“清空”操作,需求中要求清空信息包括清空所有的下拉列表、文本框以及dbgrd和StringGrid。

//文本框

edt1.Text := '';

//下拉列表

cbb1.ItemIndex:=-1;

//清空dbgrd

dbgrd1.DataSource.DataSet.Close;

dbgrd1.Refresh;

//清空StringGrid

for   i:=1   to   strngrd1.rowcount   do
begin
      for   j:=1   to   strngrd1.colcount   do
          strngrd1.cells[j-1,i-1]:='';

end;

――――――――――――――――
原文链接:https://blog.csdn.net/camillect/article/details/81033657

相关阅读 >>

Delphi 操作前,删除前,覆盖前,询问对话框

Delphi 时间与字符串

Delphi memo1 自定义位置插入

Delphi 在减少占用资源的情况下,等待msecs毫秒

Delphi opentextfiledialog用法

Delphi 获取自身软件的版本号

Delphi整理五(枚举、子界、集合)

Delphi fdmemtable1建立缓存表 模糊查询

Delphi wmi获取网卡mac

Delphi 获取指定年月的周、日数 -weeksinayear、weeksinyear、daysinayear、daysinamonth、daysinyear、daysinmonth

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...