unit uViewCuentas; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uViewGrid, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, uDADataTable, cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid, uBizCuentas, ActnList, Menus, cxGridBandedTableView, cxGridDBBandedTableView, JvComponent, JvFormAutoSize, PngImageList, ImgList, dxPSGlbl, dxPSUtl, dxPSEngn, dxPrnPg, dxBkgnd, dxWrap, dxPrnDev, dxPSCompsProvider, dxPSFillPatterns, dxPSEdgePatterns, dxPSCore, dxPScxCommon, dxPScxGrid6Lnk, cxGridCustomPopupMenu, cxGridPopupMenu, uViewFiltroBase, TB2Item, TBX, TB2Toolbar, TBXDkPanels, TB2Dock, dxPgsDlg, uDAInterfaces, cxCalendar, cxImageComboBox, cxTextEdit, uCustomView, uViewBase; type IViewCuentas = interface(IViewGrid) ['{E6798DF7-011C-40EC-B368-160C48697445}'] function GetCuentas: IBizCuenta; procedure SetCuentas(const Value: IBizCuenta); property Cuentas: IBizCuenta read GetCuentas write SetCuentas; end; TfrViewCuentas = class(TfrViewGrid, IViewCuentas) cxGridViewDESCRIPCION: TcxGridDBColumn; cxGridViewREF_CUENTA: TcxGridDBColumn; cxGridViewID: TcxGridDBColumn; PngImageList: TPngImageList; cxGridViewEPIGRAFE: TcxGridDBColumn; cxGridViewBALANCE: TcxGridDBColumn; cxGridViewCUENTA_ESPECIAL: TcxGridDBColumn; procedure cxGridViewIDCustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); protected FCuentas: IBizCuenta; function GetCuentas: IBizCuenta; virtual; procedure SetCuentas(const Value: IBizCuenta); virtual; public property Cuentas: IBizCuenta read GetCuentas write SetCuentas; end; implementation {$R *.dfm} { TfrViewCuentas } { ******************************* TfrViewCuentas ******************************* } function TfrViewCuentas.GetCuentas: IBizCuenta; begin Result := FCuentas; end; procedure TfrViewCuentas.SetCuentas(const Value: IBizCuenta); begin FCuentas := Value; if Assigned(FCuentas) then dsDataSource.DataTable := FCuentas.DataTable; end; procedure TfrViewCuentas.cxGridViewIDCustomDrawCell( Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); var R : TRect; begin inherited; R := AViewInfo.ContentBounds; ACanvas.FillRect(R); ACanvas.DrawImage(PngImageList, R.Left, R.Top, 1); ADone := True; end; end.