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

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

------解决方案--------------------
Delphi(Pascal) code
  cxGrid1DBTableView1.DataController.KeyFieldNames:='ID';
  if cxGrid1DBTableView1.DataController.LocateByKey('2') then
    showmessage('当前焦点行就是键字段ID的值为“2”的记录')
  else
    showmessage('找不到符合的记录');

------解决方案--------------------
dataset.locate('id',100,[]);