全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1093
推到 Plurk!
推到 Facebook!

請問TDBGrid

尚未結案
shing.net
中階會員


發表:207
回覆:124
積分:66
註冊:2002-03-16

發送簡訊給我
#1 引用回覆 回覆 發表時間:2002-12-03 10:35:23 IP:211.74.xxx.xxx 未訂閱
若在DBGrid定義多個ButtonStyle為cbsEllipsis 請問在oneditbuttonClick如何判斷是按了哪一個
Mecer
初階會員


發表:15
回覆:30
積分:29
註冊:2002-10-25

發送簡訊給我
#2 引用回覆 回覆 發表時間:2002-12-03 10:48:03 IP:203.204.xxx.xxx 未訂閱
if DBGrid1.SelectedField.FieldName = 'FieldName1' then begin xxxxxx..... end else if DBGrid1.SelectedField.FieldName = 'FieldName2' then begin xxxxxxx..... end else ..............................
william
版主


發表:66
回覆:2535
積分:3048
註冊:2002-07-11

發送簡訊給我
#3 引用回覆 回覆 發表時間:2002-12-03 10:51:28 IP:147.8.xxx.xxx 未訂閱
Extracted from Delphi help:    OnEditButtonClick event (TCustomDBGrid) Occurs when the user presses the ellipsis button in a grid column. Delphi syntax: property OnEditButtonClick: TNotifyEvent; C syntax: __property Classes::TNotifyEvent OnEditButtonClick = { read=FOnEditButtonClick, write=FOnEditButtonClick }; Description Write an OnEditButtonClick event handler to bring up an appropriate list or dialog when the user presses the ellipsis button in a grid cell. The OnEditButtonClick event handler can set the value of the field based on the user response to the list or dialog. Use the SelectedField property to access the TField component whose value should be set. So maybe you should look at SelectedField property.
chih
版主


發表:48
回覆:1186
積分:639
註冊:2002-04-02

發送簡訊給我
#4 引用回覆 回覆 發表時間:2002-12-03 10:54:10 IP:211.74.xxx.xxx 未訂閱
If (DBGrid1.SelectedField = DetailSQLAAA) Then Begin //do what you want end else If (DBGrid1.SelectedField = DetailSQLBBB) Then Begin //do what you want end else ...
引言: 若在DBGrid定義多個ButtonStyle為cbsEllipsis 請問在oneditbuttonClick如何判斷是按了哪一個
系統時間:2024-05-19 21:21:54
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!