- procedure TfrmMain.Button5Click(Sender: TObject);
- var
- I,J: Integer;
- SelectedRows :TBookmarkListEh ;
- s:string;
- begin
- ListBox1.Clear;
- if DBGridEh1.SelectedRows.Count >0 then begin
- with DBGridEh1.DataSource.DataSet do begin
- for I := 0 to DBGridEh1.SelectedRows.Count -1 do begin
- GotoBookmark(Pointer(DBGridEh1.SelectedRows.items[i]));
- s :='';
- for j := 0 to FieldCount -1 do begin
- if J>0 then s :=s + ' ';
- s := s+ Fields[j].AsString;
- end;
- ListBox1.Items.Add(s);
- end;
- end;
- end;
- end;
DBGridEh 多行选择
最新推荐文章于 2021-07-13 12:14:27 发布