Filtros avanzados en las columnas de los grids.
git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES/trunk@207 c93665c3-c93d-084d-9b98-7d5f4a9c3376
This commit is contained in:
parent
62af6b6de9
commit
c07616b99c
@ -5,7 +5,7 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
ClientHeight = 444
|
ClientHeight = 444
|
||||||
ClientWidth = 543
|
ClientWidth = 543
|
||||||
ExplicitWidth = 551
|
ExplicitWidth = 551
|
||||||
ExplicitHeight = 478
|
ExplicitHeight = 471
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 13
|
TextHeight = 13
|
||||||
inherited JvNavPanelHeader: TJvNavPanelHeader
|
inherited JvNavPanelHeader: TJvNavPanelHeader
|
||||||
@ -146,7 +146,7 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object TBXTMain2: TTBXToolbar
|
object TBXTMain2: TTBXToolbar
|
||||||
Left = 337
|
Left = 341
|
||||||
Top = 49
|
Top = 49
|
||||||
Caption = 'tbxMain'
|
Caption = 'tbxMain'
|
||||||
ChevronHint = 'M'#225's botones|'
|
ChevronHint = 'M'#225's botones|'
|
||||||
@ -214,7 +214,7 @@ inherited fEditorGridBase: TfEditorGridBase
|
|||||||
end
|
end
|
||||||
object actFiltrar: TAction
|
object actFiltrar: TAction
|
||||||
Category = 'Buscar'
|
Category = 'Buscar'
|
||||||
Caption = 'Filtrar m'#225's..'
|
Caption = 'Filtrar m'#225's...'
|
||||||
OnExecute = actFiltrarExecute
|
OnExecute = actFiltrarExecute
|
||||||
OnUpdate = actFiltrarUpdate
|
OnUpdate = actFiltrarUpdate
|
||||||
end
|
end
|
||||||
|
|||||||
@ -179,14 +179,16 @@ begin
|
|||||||
if Assigned(ViewGrid) then
|
if Assigned(ViewGrid) then
|
||||||
if ViewGrid.ViewFiltros.VerFiltros then
|
if ViewGrid.ViewFiltros.VerFiltros then
|
||||||
begin
|
begin
|
||||||
tbxEditFiltro.Visible := False;
|
tbxEditFiltro.Enabled := False;
|
||||||
TBXItem7.Visible := False;
|
TBXItem7.Enabled := False;
|
||||||
|
ViewGrid.VerFiltroColumnas := True;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
ViewGrid.VerFiltroColumnas := False;
|
||||||
tbxEditFiltro.Text := '';
|
tbxEditFiltro.Text := '';
|
||||||
tbxEditFiltro.Visible := True;
|
tbxEditFiltro.Enabled := True;
|
||||||
TBXItem7.Visible := True;
|
TBXItem7.Enabled := True;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ inherited frViewGrid: TfrViewGrid
|
|||||||
LookAndFeel.Kind = lfOffice11
|
LookAndFeel.Kind = lfOffice11
|
||||||
LookAndFeel.NativeStyle = True
|
LookAndFeel.NativeStyle = True
|
||||||
object cxGridView: TcxGridDBTableView
|
object cxGridView: TcxGridDBTableView
|
||||||
OnDblClick = cxGridViewDblClick
|
OnDblClick = cxGridViewDblClick
|
||||||
NavigatorButtons.ConfirmDelete = False
|
NavigatorButtons.ConfirmDelete = False
|
||||||
FilterBox.Visible = fvNever
|
FilterBox.Visible = fvNever
|
||||||
DataController.DataSource = dsDataSource
|
DataController.DataSource = dsDataSource
|
||||||
@ -47,6 +47,7 @@ inherited frViewGrid: TfrViewGrid
|
|||||||
OptionsView.GridLines = glHorizontal
|
OptionsView.GridLines = glHorizontal
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.HeaderEndEllipsis = True
|
OptionsView.HeaderEndEllipsis = True
|
||||||
|
OptionsView.NewItemRowInfoText = 'Click here to add a new row'
|
||||||
Styles.Inactive = cxStyleSelection
|
Styles.Inactive = cxStyleSelection
|
||||||
Styles.Selection = cxStyleSelection
|
Styles.Selection = cxStyleSelection
|
||||||
Styles.OnGetContentStyle = cxGridViewStylesGetContentStyle
|
Styles.OnGetContentStyle = cxGridViewStylesGetContentStyle
|
||||||
@ -154,7 +155,7 @@ inherited frViewGrid: TfrViewGrid
|
|||||||
PrinterPage.ScaleMode = smFit
|
PrinterPage.ScaleMode = smFit
|
||||||
PrinterPage._dxMeasurementUnits_ = 0
|
PrinterPage._dxMeasurementUnits_ = 0
|
||||||
PrinterPage._dxLastMU_ = 2
|
PrinterPage._dxLastMU_ = 2
|
||||||
ReportDocument.CreationDate = 39296.809313506940000000
|
ReportDocument.CreationDate = 39449.781622719910000000
|
||||||
StyleManager = dxPrintStyleManager1
|
StyleManager = dxPrintStyleManager1
|
||||||
OptionsCards.Shadow.Depth = 0
|
OptionsCards.Shadow.Depth = 0
|
||||||
OptionsExpanding.ExpandGroupRows = True
|
OptionsExpanding.ExpandGroupRows = True
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{*******************************************************}
|
{*******************************************************}
|
||||||
{ }
|
{ }
|
||||||
{ Administración de puntos de venta }
|
{ Administración de puntos de venta }
|
||||||
{ }
|
{ }
|
||||||
|
|||||||
@ -72,13 +72,17 @@ type
|
|||||||
procedure SetViewFiltros(const Value: IViewFiltroBase);
|
procedure SetViewFiltros(const Value: IViewFiltroBase);
|
||||||
property ViewFiltros: IViewFiltroBase read GetViewFiltros write SetViewFiltros;
|
property ViewFiltros: IViewFiltroBase read GetViewFiltros write SetViewFiltros;
|
||||||
|
|
||||||
function esSeleccionCeldaDatos: Boolean;
|
function EsSeleccionCeldaDatos: Boolean;
|
||||||
|
|
||||||
function getNumSeleccionados: Integer;
|
function GetNumSeleccionados: Integer;
|
||||||
property NumSeleccionados: Integer read getNumSeleccionados;
|
property NumSeleccionados: Integer read getNumSeleccionados;
|
||||||
|
|
||||||
function Locate(const AItemIndex: Integer; const AValue: String;
|
function Locate(const AItemIndex: Integer; const AValue: String;
|
||||||
const APartialCompare: Boolean = False) : Boolean;
|
const APartialCompare: Boolean = False) : Boolean;
|
||||||
|
|
||||||
|
function GetVerFiltroColumnas: Boolean;
|
||||||
|
procedure SetVerFiltroColumnas(const Value: Boolean);
|
||||||
|
property VerFiltroColumnas: Boolean read GetVerFiltroColumnas write SetVerFiltroColumnas;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -112,6 +116,8 @@ type
|
|||||||
procedure SetViewFiltros(const Value: IViewFiltroBase); virtual;
|
procedure SetViewFiltros(const Value: IViewFiltroBase); virtual;
|
||||||
procedure FilterChanged(Sender : TObject); virtual;
|
procedure FilterChanged(Sender : TObject); virtual;
|
||||||
|
|
||||||
|
function GetVerFiltroColumnas: Boolean;
|
||||||
|
procedure SetVerFiltroColumnas(const Value: Boolean);
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -152,6 +158,7 @@ type
|
|||||||
property PopupMenu: TPopupMenu read GetPopupMenu write SetPopupMenu;
|
property PopupMenu: TPopupMenu read GetPopupMenu write SetPopupMenu;
|
||||||
property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
|
property MultiSelect : Boolean read GetMultiSelect write SetMultiSelect;
|
||||||
property NumSeleccionados: Integer read getNumSeleccionados;
|
property NumSeleccionados: Integer read getNumSeleccionados;
|
||||||
|
property VerFiltroColumnas: Boolean read GetVerFiltroColumnas write SetVerFiltroColumnas;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
@ -237,6 +244,11 @@ begin
|
|||||||
Result := FPopupMenu;
|
Result := FPopupMenu;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TfrViewGridBase.GetVerFiltroColumnas: Boolean;
|
||||||
|
begin
|
||||||
|
Result := _FocusedView.OptionsCustomize.ColumnFiltering;
|
||||||
|
end;
|
||||||
|
|
||||||
function TfrViewGridBase.GetViewFiltros: IViewFiltroBase;
|
function TfrViewGridBase.GetViewFiltros: IViewFiltroBase;
|
||||||
begin
|
begin
|
||||||
Result := FViewFiltros;
|
Result := FViewFiltros;
|
||||||
@ -340,6 +352,16 @@ begin
|
|||||||
FPopupMenu := Value;
|
FPopupMenu := Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewGridBase.SetVerFiltroColumnas(const Value: Boolean);
|
||||||
|
begin
|
||||||
|
_FocusedView.BeginUpdate;
|
||||||
|
try
|
||||||
|
_FocusedView.OptionsCustomize.ColumnFiltering := Value;
|
||||||
|
finally
|
||||||
|
_FocusedView.EndUpdate;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrViewGridBase.SetViewFiltros(const Value: IViewFiltroBase);
|
procedure TfrViewGridBase.SetViewFiltros(const Value: IViewFiltroBase);
|
||||||
begin
|
begin
|
||||||
if Assigned(FViewFiltros) then
|
if Assigned(FViewFiltros) then
|
||||||
|
|||||||
Reference in New Issue
Block a user