cxGrid获得焦点后如何直接进入编辑状态?如按回车进入下一行的指定单元格后,不能直接进入编辑状态,而是要再按回车才行。我的cxGrid KeyDown 代碼如下:procedure TfrmCostSheet.tvGridVampEditKeyDown(
Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem;
AEdit: TcxCustomEdit; var Key: Word; Shift: TShiftState);
begin
inherited;
If Key=13 then
begin
if AItem.Index=tvGridVampCurrency.Index then
tvGridVamp.Controller.FocusedColumn:=tvGridVampUnitPriceEX
else if AItem.Index=tvGridVampUnitPriceEX.Index then
begin
tvGridVamp.Controller.GoToNext(False);
tvGridVamp.Controller.FocusedColumn:=tvGridVampCurrency;
end
else if AItem.Index=tvGridVampRe.Index then
begin
tvGridVamp.Controller.GoToNext(False);
tvGridVamp.Controller.FocusedColumn:=tvGridVampRe;
end;
end;
end;
對不起,本人帳號沒分,大家可以幫個忙嗎?
Sender: TcxCustomGridTableView; AItem: TcxCustomGridTableItem;
AEdit: TcxCustomEdit; var Key: Word; Shift: TShiftState);
begin
inherited;
If Key=13 then
begin
if AItem.Index=tvGridVampCurrency.Index then
tvGridVamp.Controller.FocusedColumn:=tvGridVampUnitPriceEX
else if AItem.Index=tvGridVampUnitPriceEX.Index then
begin
tvGridVamp.Controller.GoToNext(False);
tvGridVamp.Controller.FocusedColumn:=tvGridVampCurrency;
end
else if AItem.Index=tvGridVampRe.Index then
begin
tvGridVamp.Controller.GoToNext(False);
tvGridVamp.Controller.FocusedColumn:=tvGridVampRe;
end;
end;
end;
對不起,本人帳號沒分,大家可以幫個忙嗎?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货