This commit is contained in:
roberto 2008-05-28 17:56:32 +00:00
parent f220527836
commit 0fd52dad6b

View File

@ -97,12 +97,17 @@ begin
if ASource.Active then if ASource.Active then
ASource.Close; ASource.Close;
for i := 0 to AObj.SelectedRecords.Count - 1 do //Si no hay elemento seleccionados filtramos para que ATarget se quede vacia
begin if (AObj.SelectedRecords.Count = 0) then
if (i > 0) then ASource.Filter := ASource.Filter + '(ID = ' + IntToStr(ID_NULO) + ')'
ASource.Filter := ASource.Filter + ' or '; //En caso contrario filtramos por los elementos seleccionados
ASource.Filter := ASource.Filter + '(ID = ' + IntToStr(AObj.SelectedRecords.Items[i]) + ')'; else
end; for i := 0 to AObj.SelectedRecords.Count - 1 do
begin
if (i > 0) then
ASource.Filter := ASource.Filter + ' or ';
ASource.Filter := ASource.Filter + '(ID = ' + IntToStr(AObj.SelectedRecords.Items[i]) + ')';
end;
ASource.Filtered := True; ASource.Filtered := True;
end; end;