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;









本文转自鹅倌51CTO博客,原文链接: http://blog.51cto.com/kaixinbuliao/1275088,如需转载请自行联系原作者








上一篇:tp5在phpstudy下URL无法去掉index.php的解决方案


下一篇:ECS使用之感受