RT,

解决方案 »

  1.   

    楼主是不是说StringGrid呢
    如果是的话:
    sg.rows := a //指定的行
    sg.cols := b //指定的列sg.setfocus //得到焦点
      

  2.   

    StrngGrid 中定位Cell[1,1]  //cell[1,1],你可以根据要求自己来写!
    procedure TForm1.Button1Click(Sender: TObject);//可变通为定位任意Cell
    Var
      myRect:TGridRect;
    begin
      myRect.Left := 1;   //left right 控制col, top bottom  控制row
      myRect.Top := 1;
      myRect.Right := 1;
      myRect.Bottom := 1;
      StringGrid1.Selection := myRect;
    end;
      

  3.   

    无论何种Grid都可以,主要是这是当初别人写的一个Grid,现在用条码扫描输入的时候,完了要直接跳到下一行记录的同个单元格
      

  4.   

    StringGrid1.Row := 2;
      StringGrid1.Col := 3;
      StringGrid1.SetFocus;
      Edit1.Text := StringGrid1.Cells[StringGrid1.Col, StringGrid1.Row];
      

  5.   

    dbgrid1.selectedfield := dbgrid1.datasource.date.fieldbyname('aa');
      

  6.   

    TstringGrid(dbgrid1).Row:=2;
      TstringGrid(dbgrid1).Col:=3;
      TstringGrid(dbgrid1).SetFocus;