在DBGrid中用代码实现按回车键跳到下一格的方法

Posted 癫狂编程

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在DBGrid中用代码实现按回车键跳到下一格的方法相关的知识,希望对你有一定的参考价值。

示例:

 if Key = 13 then //回車後跳到下一格
    with TDbgrideh(ActiveControl) do
    begin
      if Selectedindex < (FieldCount - 1) then
        Selectedindex := Selectedindex + 1
      else
      begin
        dbgrideh.DataSource.DataSet.Next;
        Selectedindex := 0;
      end
    end;
————————————————

以上是关于在DBGrid中用代码实现按回车键跳到下一格的方法的主要内容,如果未能解决你的问题,请参考以下文章