anchor.diff:    RefreshPageIndexAndGridInterface;
   end;
   
  +procedure TCustomVisualGrid.UpdateSelection(ASelectionType: TSelectionType);
  +var
  +  LSelectionEvent: boolean;
  +begin
  +  if FCurrentSelectionType = ASelectionType then
  +    Exit;
  +
  +  FCurrentSelectionType:=ASelectionType;
  +  LSelectionEvent := FCurrentSelectionType=stNone;
  +  case FCurrentSelectionType of
  +    stNone: FDrawGrid.Options:=FDefaultDrawGridOptions;
  +    stCell: FDrawGrid.Options:=FDefaultDrawGridOptions+[goDrawFocusSelected];
  +    stRow: FDrawGrid.Options:=FDefaultDrawGridOptions+[goRowSelect];
  +    stMultiRow: FDrawGrid.Options:=FDefaultDrawGridOptions+[goRowSelect,goRangeSelect];
  +  end;
  +  if LSelectionEvent and Assigned(FOnSelection) then
  +      FOnSelection(Self, FLastSelection);
  +end;
  +
  +function TCustomVisualGrid.SelectionsEquals(constref A, B: TVisualGridSelection
  +  ): boolean;
  +begin
  +  case FSelectionType of
  +    stNone: Result := false;
  +    stCell: Result := (A.Col = B.Col) and (A.Row = B.Row);
  +    stRow: Result := (A.Row = B.Row);
  +    stMultiRow: Result := (A.Row = B.Row) and (A.RowCount = B.RowCount);
  +  end;
  +end;
  +
  +procedure TCustomVisualGrid.ResetLastSelection;
  +begin
  +  FLastSelection.Selections := nil;
  +end;
  +
   procedure TCustomVisualGrid.SetPageSize(Value: Integer);
   begin
     if FPageSize = Value then
  
positive.code: 
  procedure TCustomVisualGrid.GridSelection(Sender: TObject; aCol, aRow: Integer);
  begin
    if (SelectionType <> stNone) and Assigned(FOnSelection) then
      FOnSelection(Self, Selection);
  end;
  
  
negative.code: 
    { TVisualGridOptions }
  
    TVisualGridOptions = set of (vgoColAutoFill, vgoColSizing, vgoAllowDeselect,
      vgoMultiSearchCheckComboBox, vgoSortDirectionAllowNone);
  
    { TSortMode }
  
  