From dd91e00af2c159aa30a04cef4db82c3d314ad06f Mon Sep 17 00:00:00 2001 From: roberto Date: Tue, 1 Jul 2008 10:53:15 +0000 Subject: [PATCH] Arreglo para que en el caso de tener varias vistas el grid aplique el quitar agrupaciones a todas y cada una de elllas git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@259 f4e31baf-9722-1c47-927c-6f952f962d4b --- Source/GUIBase/uViewGrid.pas | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/GUIBase/uViewGrid.pas b/Source/GUIBase/uViewGrid.pas index 640049a3..de355e5a 100644 --- a/Source/GUIBase/uViewGrid.pas +++ b/Source/GUIBase/uViewGrid.pas @@ -138,16 +138,19 @@ end; procedure TfrViewGrid.actQuitarAgrupacionesExecute(Sender: TObject); var Columna: TcxGridDBColumn; - i: Integer; + i,j: Integer; begin inherited; - for i := 0 to cxGridView.ColumnCount - 1 do + for j := 0 to cxGrid.ViewCount - 1 do begin - Columna := (cxGridView as TcxGridDBTableView).Columns[i]; - if not (Columna.GroupIndex < 0) then + for i := 0 to (cxGrid.Views[j] as tcxGridDBTableView).ColumnCount - 1 do begin - Columna.GroupIndex := -1; - Columna.Visible := True; + Columna := (cxGrid.Views[j] as TcxGridDBTableView).Columns[i]; + if not (Columna.GroupIndex < 0) then + begin + Columna.GroupIndex := -1; + Columna.Visible := True; + end; end; end; end;