——此文章摘自《Delphi 數據庫開發經典案例解析》定價
¥
特價
¥
購買>>
http://track
linktech
cn/?m_id=dangdang&a_id=A
&l=
&l_type
=
width=
height=
border=
nosave>
() 控件添加和設置完畢後為DBGrid的DBGridCellClick事件添加處理代碼添加這一事件的目的是因為我們使用的是文本框控件Edit因此必須自己編寫代碼將DBGrid中的數據讀入到相應的各個文本框裡面代碼如下
//
//職員信息管理功能的實現
//職員信息維護
procedure TmainDBGridCellClick(Column: TColumn);
//將用戶在dbgrid上所選取的職員的全部信息添加到職員信息維護窗體中的相應文本框中
begin
adotableRefresh;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
comboboxText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
comboboxText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
comboboxText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
editText:=dbgridFields[]AsString;
//允許修改插入刪除記錄
buttonEnabled:=true;
buttonEnabled:=true;
buttonEnabled:=true;
end;
right>[http://developcsaicn/delphi/htm>] []
From:http://tw.wingwit.com/Article/program/Delphi/201311/24795.html