是个BOOKMARK类型的属性。

SelectedRows: TBookmarkList
procedure TForm1.Button1Click(Sender: TObject);
var
i, j: Integer;
s: string;
begin
if DBGrid1.SelectedRows.Count>0 then
  with DBGrid1.DataSource.DataSet do
   for i:=0 to DBGrid1.SelectedRows.Count-1 do
   begin
    GotoBookmark(pointer(DBGrid1.SelectedRows.Items[i]));
    for j := 0 to FieldCount-1 do
    begin
     if (j>0) then s:=s+', ';
     s:=s+Fields[j].AsString;
    end;
    Listbox1.Items.Add(s);
    s:= '';
   end;
end;  

相关文章:

  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2021-03-30
  • 2022-01-01
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案