if DBGrid1.SelectedRows.Count=1 then
with DBGrid1.DataSource.DataSet do
begin
GotoBook(pointer(DBGrid1.SelectedRows.Items[0]));
j:=inttostr(fieldbyname('试卷编号').Value);
end
with DBGrid1.DataSource.DataSet do
begin
GotoBook(pointer(DBGrid1.SelectedRows.Items[0]));
j:=inttostr(fieldbyname('试卷编号').Value);
end
c:integer; for varc:=0 to dbgrid.SelectedRows.Count-1 do
begin
dataset.GotoBook(pointer(dbgrid.SelectedRows[c]));
//这里,你的操作
end;
c:integer; for varc:=0 to dbgrid.SelectedRows.Count-1 do
begin
dataset.GotoBook(pointer(dbgrid.SelectedRows[c]));
//这里,你的操作
end;