M man4 Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-09 #1 我将QUERY查询的数据显示DBGRID中。我想电击DBGRID让数据出现在EDIT里然后进行编辑,问题是电击后如何让数据在EDIT出现(注意是EDIT,不是DBEDIT) (50分)<br />谢谢
I imaduck Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-09 #2 edit.text:=query.fieldvalues['xx'];
L lijianbao32 Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-09 #3 其实你可以用InputBox函数来实现这一功能的。
T tianli_ Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-09 #4 query.datasource.dataset.fieldvalues('XX');
L lsmsd Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-09 #5 procedure Form1.DBGridDClick(Sender: TObject); begin Gotobookmark(pointer(DbGrid.SelectedRows.Items[0])); Edit.text:=DbGrid.DataSource.DataSet.Fields[1].AsString; end;
procedure Form1.DBGridDClick(Sender: TObject); begin Gotobookmark(pointer(DbGrid.SelectedRows.Items[0])); Edit.text:=DbGrid.DataSource.DataSet.Fields[1].AsString; end;
Z zjxxln Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-09 #6 这样做只是在edit中的得到了数据,怎么修改后写回到数据库中?
老 老人家 Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-09 #7 edit.text:=adotable1.fieldvalues['xx']; //得到数据 adotable1.fieldvalues['xx'] := edit.text; //写入数据
原 原野飞侠 Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-09 #8 Edi1.text:=Query1.FieldByName(DBgrid1.SelectedField.FieldName).AsString;