读书人

cxgrid怎么自动选中小弟我查询出的数据

发布时间: 2012-07-29 15:26:14 作者: rapoo

cxgrid如何自动选中我查询出的数据
查询某条数据,如何自动选中cxgrid对应表的该条数据

[解决办法]

Delphi(Pascal) code
  cxGrid1DBTableView1.DataController.KeyFieldNames:='ID';  if cxGrid1DBTableView1.DataController.LocateByKey('2') then    showmessage('当前焦点行就是键字段ID的值为“2”的记录')  else    showmessage('找不到符合的记录');
[解决办法]
dataset.locate('id',100,[]);

读书人网 >.NET

热点推荐