diff --git a/Source/Modulos/Inventario/Views/uViewInventario.dfm b/Source/Modulos/Inventario/Views/uViewInventario.dfm index 356e7951..7b935b25 100644 --- a/Source/Modulos/Inventario/Views/uViewInventario.dfm +++ b/Source/Modulos/Inventario/Views/uViewInventario.dfm @@ -3,7 +3,7 @@ inherited frViewInventario: TfrViewInventario RootLevelOptions.DetailTabsPosition = dtpTop OnActiveTabChanged = cxGridActiveTabChanged inherited cxGridView: TcxGridDBTableView - DataController.KeyFieldNames = 'ID_ALMACEN; ID_ARTICULO' + DataController.KeyFieldNames = 'RECID' DataController.Summary.DefaultGroupSummaryItems = < item Format = ',0.00 '#8364';-,0.00 '#8364 diff --git a/Source/Modulos/Inventario/Views/uViewInventario.pas b/Source/Modulos/Inventario/Views/uViewInventario.pas index 43df3f17..3e2a123a 100644 --- a/Source/Modulos/Inventario/Views/uViewInventario.pas +++ b/Source/Modulos/Inventario/Views/uViewInventario.pas @@ -166,17 +166,22 @@ begin if Assigned(FAlmacenes) then begin - cxGridLevel.Caption := 'Todos los almacenes'; - if not FAlmacenes.DataTable.Active then - FAlmacenes.DataTable.Active := True; + cxGrid.BeginUpdate; + try + cxGridLevel.Caption := 'Todos los almacenes'; + if not FAlmacenes.DataTable.Active then + FAlmacenes.DataTable.Active := True; - FAlmacenes.First; - while not FAlmacenes.EOF do - begin - Nivel := cxGrid.Levels.Add; - Nivel.Caption := FAlmacenes.NOMBRE; - Nivel.Tag := FAlmacenes.ID; - FAlmacenes.Next; + FAlmacenes.First; + while not FAlmacenes.EOF do + begin + Nivel := cxGrid.Levels.Add; + Nivel.Caption := FAlmacenes.NOMBRE; + Nivel.Tag := FAlmacenes.ID; + FAlmacenes.Next; + end; + finally + cxGrid.EndUpdate; end; end; end; @@ -198,17 +203,22 @@ begin if Assigned(FObras) then begin - cxGridLevel.Caption := 'Todos las obras'; - if not FObras.DataTable.Active then - FObras.DataTable.Active := True; + cxGrid.BeginUpdate; + try + cxGridLevel.Caption := 'Todos las obras'; + if not FObras.DataTable.Active then + FObras.DataTable.Active := True; - FObras.First; - while not FObras.EOF do - begin - Nivel := cxGrid.Levels.Add; - Nivel.Caption := FObras.NOMBRE; - Nivel.Tag := FObras.ID; - FObras.Next; + FObras.First; + while not FObras.EOF do + begin + Nivel := cxGrid.Levels.Add; + Nivel.Caption := FObras.NOMBRE; + Nivel.Tag := FObras.ID; + FObras.Next; + end; + finally + cxGrid.EndUpdate; end; end; end;