L littlefat Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-07 #1 delphi新手: DBGrid控件中,如何取得选中的行(多行),并将这些行取出?
Q qianwt Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-07 #2 for I := 0 to DBGrid.SelectedRows.Count - 1 do begin //记录移到第 I 个选择行 DBGrid.DataSource.DataSet.GotoBookmark(Pointer(DBGrid_Detail.SelectedRows)); end;
for I := 0 to DBGrid.SelectedRows.Count - 1 do begin //记录移到第 I 个选择行 DBGrid.DataSource.DataSet.GotoBookmark(Pointer(DBGrid_Detail.SelectedRows)); end;
L littlefat Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-07 #3 谢谢。 dbgrid1.SelectedRows.Items;即可。 为什么要dbgrid.datasource.datase.gotobookmark.....呢?
H hcbride Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-07 #4 DBGrid控件好象只能单行选择 建议用DBGridEH这个控件,不错
L littlefat Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-07 #5 可以选择多行。将dbgrid的options的multiselect设定为true即可。