2、改数据集中永久字段的DisplayLabel属性即可
—————————————————————————————————
MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
             毁誉由人,望天上云卷云舒,聚散任风。';
if Not Assigned(I) then
  I := TI.Create(Nil);
I.Maxim := MaximStr;
I.Desire := '加不加分随你';
—————————————————————————————————
       

解决方案 »

  1.   

    procedure TForm1.DBGrid1KeyPress(Sender: TObject; var Key: Char);
    begin
    if Key=#13 then //如果按键为ENTER键
      if DBGrid1.selectedindex <(DBGrid1.fieldcount -1)then //如果当前活动焦点小于当前数据网格的字段数
        DBGid1.selectedindex := DBGrid1.selectedindex +1 //转入该数据的下一个字段
      else
       begin
        if not table1.Eof then //如果不是TABLE1的最后一条记录
         begin //指向下一条记录
          table1.Next;
          DBGrid1.SelectedIndex:=0; //将当前的活动焦点定位在该记录的第一个字段中
         end;
       end;
    end;
      

  2.   

    procedure TForm1.DBGrid1KeyPress(Sender: TObject; var Key: Char);
    begin
    if Key=#13 then //如果按键为ENTER键
      if DBGrid1.selectedindex <(DBGrid1.fieldcount -1)then //如果当前活动焦点小于当前数据网格的字段数
        DBGid1.selectedindex := DBGrid1.selectedindex +1 //转入该数据的下一个字段
      else
       begin
        if not table1.Eof then //如果不是TABLE1的最后一条记录
         begin //指向下一条记录
          table1.Next;
          DBGrid1.SelectedIndex:=0; //将当前的活动焦点定位在该记录的第一个字段中
         end;
       end;
    end;
      

  3.   

    1、
    procedure TForm1.DBGrid1KeyPress(Sender: TObject; var Key: Char);
    begin
      if Key = #13 then
        PostMessage(DBGrid1.Handle,WM_KEYDOWN,VK_TAB,0);
    end;
    —————————————————————————————————
    MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
                 毁誉由人,望天上云卷云舒,聚散任风。';
    if Not Assigned(I) then
      I := TI.Create(Nil);
    I.Maxim := MaximStr;
    I.Desire := '加不加分随你';
    —————————————————————————————————
           
      

  4.   

    lxpbuaa(桂枝香在故国晚秋) 这位兄弟问题一已解决,但‘2、改数据集中永久字段的DisplayLabel属性即可’这个如何做,query_dept只有dept_id, 没有dept_name啊