About DBGrid |
尚未結案
|
marker
一般會員 發表:9 回覆:5 積分:2 註冊:2004-11-05 發送簡訊給我 |
|
Fishman
尊榮會員 發表:120 回覆:1949 積分:2163 註冊:2006-10-28 發送簡訊給我 |
Hi marker, 參考
http://delphi.ktop.com.tw/topic.php?topic_id=59085
http://delphi.ktop.com.tw/topic.php?topic_id=56899 1.定義一個 type
type TDumDBGrid=class(TDBGrid);2.取的目前 Row procedure TForm1.Button2Click(Sender: TObject); begin ShowMessage(IntToStr(TDumDBGrid(DBGrid1).Row)); end;---------------------------------- 小弟才疏學淺,若有謬誤尚請不吝指教 ----------------------------------
------
Fishman |
marker
一般會員 發表:9 回覆:5 積分:2 註冊:2004-11-05 發送簡訊給我 |
Fishman, It seems this value only show the row number of the displaying page
in DBGrid, that means if the total number of row in the DBGrid is
larger than this of a single page that the DBGrid can display, I will
need to add a offset for this value if I need the actually row number
of the record set. Is there a way to find this offset value? Mark Leung
|
Fishman
尊榮會員 發表:120 回覆:1949 積分:2163 註冊:2006-10-28 發送簡訊給我 |
Hi marker, What kind of DataSet do you use !? Maybe you can use DBGrid1.DataSource.DataSet.RecNo to identify actually row number of the DataSet. But it seems only work on ADO & ClientDataSet. If you use BDE as your dataset. Add DatasetProvide & ClientDataSet to solve this problem. http://delphi.ktop.com.tw/topic.php?topic_id=29579 ----------------------------------
小弟才疏學淺,若有謬誤尚請不吝指教
----------------------------------
------
Fishman |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |