取得grid单元格里刚输入的文本内容,未保存的文本,正在输入的值,正在编辑的值,编辑框

dbgrid->DataSource->DataSet->UpdateRecord();

procedure TForm1.DBGrid1KeyUp(Sender: TObject; var Key: Word;

Shift: TShiftState);

begin

if ADOQuery1.State in [dsinsert,dsedit] then

ADOQuery1.UpdateRecord;

end;

DBGridEh1->InplaceEditor->Text

dbgrideh调出编辑框,相当于F2,

DBGridEh2->SetFocus();
DBGridEh2->SelectedIndex = 7;
DBGridEh2->EditorMode=true;

05-01 02:20