anchor.diff:  begin
     FIDataProvider := aDataProvider;
     FSortedIndex.Clear;
  +  FGarbage.Clear;
   end;
   
   procedure TReadOnlyVirtualDatasetProvider.GetFieldValue(const AField: TField; const AIndex: Integer; out AValue: variant);
   var
     tmpI : IVDDatum;
  -begin
  -  AValue := Null;
  +  idx : integer;
  +begin
     if (aIndex >= 0) then
     begin
  +
  +    if FSortedIndex.Count > 0 then
  +    begin
  +      tmpI := TDatumShell(FSortedIndex.Items[aIndex]).Datum;
  +      idx := TDatumShell(FSortedIndex.Items[aIndex]).Idx;
  +    end
  +    else
  +    begin
  +      tmpI := FIDataProvider.GetDatum(aIndex);
  +      idx := aIndex;
  +    end;
  +    AValue := Null;
  +
      if CompareText(aField.FieldName, KEY_FIELD_NAME) = 0 then
  -     aValue := aIndex
  +     aValue := idx
      else
  -   begin
  -     if FSortedIndex.Count > 0 then
  -     begin
  -       tmpI := IVDDatum(FSortedIndex.Items[aIndex]);
  -     end
  -     else
  -     begin
  -       tmpI := FIDataProvider.GetDatum(aIndex);
  -     end;
        aValue := tmpI.GetPropertyByFieldName(AField.FieldName);
  -   end;
     end;
   end;
   
  
positive.code: 
      FCurrentSortConditions : TSortByConditions;
      FCurrentSortFields : TStringList;
  
      function OnCompare(Item1: Pointer;Item2: Pointer):Integer;
    public
  
negative.code: function TReadOnlyVirtualDatasetProvider.Sort(const aConditions: TSortByConditions) : boolean;
  var
    i : integer;
    tmp : TDatumShell;
  begin
    if not Assigned(FIDataProvider) then
      Result := false
  