diff --git a/Source/GUIBase/uEditorGridBase.pas b/Source/GUIBase/uEditorGridBase.pas index dcfcdc2d..3ea6a720 100644 --- a/Source/GUIBase/uEditorGridBase.pas +++ b/Source/GUIBase/uEditorGridBase.pas @@ -283,21 +283,17 @@ begin end; procedure TfEditorGridBase.RefrescarInterno; -var - FocusedRow, TopRow : Integer; begin - TopRow := ViewGrid._FocusedView.Controller.TopRowIndex; - FocusedRow := ViewGrid._FocusedView.DataController.FocusedRowIndex; - ViewGrid._FocusedView.BeginUpdate; ShowHourglassCursor; + ViewGrid.SaveGridStatus; + ViewGrid._FocusedView.BeginUpdate; try // inherited; <- No hacemos lo que hay en el padre dsDataTable.DataTable.Refresh; finally ViewGrid._FocusedView.EndUpdate; - ViewGrid._FocusedView.DataController.FocusedRowIndex := FocusedRow; - ViewGrid._FocusedView.Controller.TopRowIndex := TopRow; + ViewGrid.RestoreGridStatus; HideHourglassCursor; end; end; diff --git a/Source/GUIBase/uViewGridBase.pas b/Source/GUIBase/uViewGridBase.pas index ea6b0574..ed072ad5 100644 --- a/Source/GUIBase/uViewGridBase.pas +++ b/Source/GUIBase/uViewGridBase.pas @@ -321,7 +321,9 @@ end; procedure TfrViewGridBase.SaveGridStatus; begin - FreeAndNil(FGridStatus); + if Assigned(FGridStatus) then + FreeAndNil(FGridStatus); + if not IsEmpty then FGridStatus := TcxGridStatus.Create(_FocusedView); end;