unit uViewClientes;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uViewContactos, cxStyles, cxCustomData, cxGraphics, cxFilter,
  cxData, cxDataStorage, cxEdit, DB, cxDBData, ActnList, uDADataTable,
  cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
  cxClasses, cxControls, cxGridCustomView, cxGrid, JvComponent,
  JvFormAutoSize, cxImage, PngImageList, ImgList, dxPSGlbl, dxPSUtl,
  dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider,
  dxPSFillPatterns, dxPSEdgePatterns, cxIntlPrintSys3, dxPSCore,
  dxPScxCommon, cxImageComboBox, cxGridCustomPopupMenu, cxGridPopupMenu,
  dxPScxGridLnk, ExtCtrls, JvComponentBase, JvBalloonHint, JvHint,
  uViewFiltroBase, dxPgsDlg, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock;

type
  IViewClientes = interface(IViewContactos)
  ['{7964E0AB-3075-43E7-94BC-513D80A1C116}']
  end;

  TfrViewClientes = class(TfrViewContactos, IViewClientes)
    cxGridViewNOMBRE_COMERCIAL: TcxGridDBColumn;
    cxGridViewBLOQUEADO: TcxGridDBColumn;
    cxGridViewTiendaWeb: TcxGridDBColumn;
    actAgente: TAction;
    cxGridViewAGENTE: TcxGridDBColumn;
    TBXItem2: TTBXItem;
    procedure actAgenteExecute(Sender: TObject);
    procedure actAgenteUpdate(Sender: TObject);
  end;
  

implementation

uses uViewGridBase;


{$R *.dfm}


procedure TfrViewClientes.actAgenteExecute(Sender: TObject);
begin
  if (cxGridViewAGENTE.GroupIndex < 0) then
  begin
    cxGridViewAGENTE.GroupIndex := cxGridView.GroupedColumnCount;
    cxGridViewAGENTE.Visible := False;
  end
  else
  begin
    cxGridViewAGENTE.GroupIndex := -1;
    cxGridViewAGENTE.Visible := True;
  end;
end;

procedure TfrViewClientes.actAgenteUpdate(Sender: TObject);
begin
  inherited;
  (Sender as TAction).Checked := not (cxGridViewAGENTE.GroupIndex < 0);
end;

end.
