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 idhttp控件:get/post 请求

Delphi 移动端使用 sqlite数据库查询

Delphi webbrowser选中文本操作 设置webbrowser的内容

Delphi combobox1dropdown 生成动态下拉列表

Delphi 62进制转10进制

Delphi dbnavigator1 删除时弹出确认对话框

Delphi sysutils.isdelimiter - 判断字符串的某个位置是不是指定的字符串

Delphi 将word嵌入Delphi

Delphi tstringlist.find

Delphi system 中的数学函数

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



打赏

取消

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

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

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

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

评论

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