cxgrid如何遍历单元格

procedure Tfrm_operator.cx_qixieKeyDown(Sender: TObject; var Key: Word;
 Shift: TShiftState);
begin
 if ((Chr(Key) = #13) or (Chr(key) = #9)) and
   (cx_qixie.Controller.FocusedColumnIndex + 1 < cx_qixie.VisibleColumnCount) then
 begin
     cx_qixie.Controller.FocusedColumnIndex := cx_qixie.Controller.FocusedColumnIndex+1;
 end
 else if ((Chr(Key) = #13) or (Chr(key) = #9)) and
   (cx_qixie.Controller.FocusedColumnIndex + 1 = cx_qixie.VisibleColumnCount) then
 begin
   if (cx_qixie.Controller.FocusedRowIndex +1 < cx_qixie.DataController.RowCount) then
   begin
     cx_qixie.Controller.FocusedRowIndex := cx_qixie.Controller.FocusedRowIndex+1;
     cx_qixie.Controller.FocusedColumnIndex := 0;
   end
   else
   begin
     ActiveControl := btn_add;
     exit;
   end;
 end;
end;

你可能感兴趣的:(遍历,单元格,cxgrid)