Arreglo en unas cosillas del comportamiento de los detalles base
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@140 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
e3bfa96d3b
commit
bd1549f07c
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -163,6 +163,8 @@ type
|
||||
function darTipoLetraPorDefecto: TFont; virtual;
|
||||
function GetFocusedView : TcxGridDBTableView; virtual;
|
||||
function GetGrid : TcxGrid; virtual;
|
||||
procedure SeleccionarRowActual;
|
||||
|
||||
public
|
||||
procedure BeginUpdate;
|
||||
procedure EndUpdate;
|
||||
@ -236,9 +238,11 @@ begin
|
||||
if(FDetalles.RecordCount > 0) then
|
||||
begin
|
||||
//Selecciona en el grid el registro siguiente
|
||||
if (AuxRow < cxGridView.DataController.RowCount-1)
|
||||
then Inc(AuxRow)
|
||||
else Dec(AuxRow);
|
||||
if (AuxRow < cxGridView.DataController.RowCount-1) then
|
||||
Inc(AuxRow)
|
||||
else
|
||||
Dec(AuxRow);
|
||||
|
||||
cxGridView.DataController.SelectRows(AuxRow,AuxRow);
|
||||
cxGridView.Controller.TopRowIndex := AuxTop;
|
||||
end;
|
||||
@ -246,6 +250,8 @@ begin
|
||||
finally
|
||||
cxGridView.EndUpdate;
|
||||
end;
|
||||
|
||||
SeleccionarRowActual;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetallesBase.actEliminarUpdate(Sender: TObject);
|
||||
@ -611,6 +617,15 @@ begin
|
||||
FGridStatus := TcxGridStatus.Create(_FocusedView);
|
||||
end;
|
||||
|
||||
procedure TfrViewDetallesBase.SeleccionarRowActual;
|
||||
begin
|
||||
//Quitamos lo que hubiera seleccionado
|
||||
cxGrid.ActiveView.DataController.ClearSelection;
|
||||
with cxGrid.ActiveView.DataController do
|
||||
if RowCount > 0 then
|
||||
SelectRows(GetFocusedRowIndex,GetFocusedRowIndex);
|
||||
end;
|
||||
|
||||
procedure TfrViewDetallesBase.SetController(const Value: IControllerDetallesBase);
|
||||
var
|
||||
AListaValores : TStringList;
|
||||
|
||||
Binary file not shown.
@ -31,6 +31,7 @@ type
|
||||
procedure OnValidateReferencia(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
procedure OnValidateReferenciaProveedor(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
procedure CustomViewShow(Sender: TObject);
|
||||
|
||||
protected
|
||||
procedure AnadirArticulosInterno; virtual;
|
||||
function AnadirArticulo(pReferencia: String; TipoReferencia: TEnumReferencia): Boolean; virtual;
|
||||
@ -52,6 +53,8 @@ begin
|
||||
finally
|
||||
cxGridView.EndUpdate;
|
||||
end;
|
||||
|
||||
SeleccionarRowActual;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetallesArticulos.AnadirArticulosInterno;
|
||||
@ -76,12 +79,7 @@ end;
|
||||
procedure TfrViewDetallesArticulos.CustomViewShow(Sender: TObject);
|
||||
begin
|
||||
inherited;
|
||||
{
|
||||
if DADataSource.DataTable.ReadOnly then
|
||||
ActionListContenido.State := asSuspended
|
||||
else
|
||||
ActionListContenido.State := asNormal;
|
||||
}
|
||||
SeleccionarRowActual;
|
||||
end;
|
||||
|
||||
procedure TfrViewDetallesArticulos.OnValidateReferencia(Sender: TObject; var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user