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