如何获得DataGrid选中的行的行号

zty0527 2004-07-26 05:06:57
如上,谢谢
...全文
219 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
快活林 2004-07-26
  • 打赏
  • 举报
回复
如果要在DBGRID显示行号,怎么办?
tsst 2004-07-26
  • 打赏
  • 举报
回复
showmessage(inttostr(AdoTable1.RecNo));//AdoTable1 为你所用的dbgrid对应的数据集
xiaolei_418 2004-07-26
  • 打赏
  • 举报
回复
showmessage(inttostr(TDrawGrid(dbgrid1).Row));
jinjazz 2004-07-26
  • 打赏
  • 举报
回复
showmessage(inttostr(TDrawGrid(dbgrid1).Row));
jian23cn 2004-07-26
  • 打赏
  • 举报
回复
不好意思,看错了:)
应该是:
showmessage(IntToStr(TstringGrid(dbgrid1).Row));///这个就是选中行的行号
zty0527 2004-07-26
  • 打赏
  • 举报
回复
我用鼠标点击DataGrid 中的一行,弹出一个页面,我需要点击行的行号
jinjazz 2004-07-26
  • 打赏
  • 举报
回复
双击table控件,new一个field,添加计算字段并在ongettext中附值 recno
jian23cn 2004-07-26
  • 打赏
  • 举报
回复
////////////////////获取dbgrid中某行某列的值
uses Grids;


showmessage(TstringGrid(DBGrid1).Cells[1,3])
jian23cn 2004-07-26
  • 打赏
  • 举报
回复
////////////////////获取dbgrid中某行某列的值
uses Grids;
showmessage(TstringGrid(dbgrid).Cells[1,3])
jinjazz 2004-07-26
  • 打赏
  • 举报
回复
table1.recno

2,497

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧