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,如需转载请自行联系原作者








相关文章
cxgrid多选获取记录。不需要设置KeyFieldName
procedure CopyGridRecordToJsn(pvDataSet: TcxGridDBTableView; pvValueJsn:    ISuperObject);var  i, j: Integer;  lvField: TcxGridDBColumn;  lvItem: I...
795 0