if (db_indent.Active) and (cxGridDBTableView2.Controller.SelectedRecordCount > 0) then
begin
_Value := TStringList.Create;
_Value.Clear;
for i := 0 to cxGridDBTableView2.Controller.SelectedRecordCount - 1 do
begin
cxGridDBTableView2.Controller.FocusedRow := cxGridDBTableView2.Controller.SelectedRows[i];
_NNO := db_indent.FieldByName('NNO').AsString; //编号
_Value.Add(_NNO + ' ' + _NA1 + ' ' + _uTY );
end;
try
if _Value.Text <> '' then
begin
_valueText := _Value.Text; //删除 回车,空格,等字符
Clipboard.SetTextBuf(PChar(_valueText));
end;
finally
_Value.Free;
end;
end;