我有:
unit unt_QuantumGridInterceptor;
{$OPTIMIZATION OFF}
interface
uses
{ DevExpress }
cxGridRows,
cxGridTableView,
cxGridCustomTableView,
cxCustomData,
cxGraphics;
type
TcxGridDataCellViewInfo = class(cxGridRows.TcxGridDataCellViewInfo)
protected
procedure InitTextSelection; override;
end;
TcxGridDataRowViewInfo = class(cxGridRows.TcxGridDataRowViewInfo)
protected
function GetCellViewInfoClass(AIndex: Integer): TcxGridDataCellViewInfoClass; override;
end;
TcxGridDataRow = class(cxGridTableView.TcxGridDataRow)
protected
function GetViewInfoClass: TcxCustomGridRecordViewInfoClass; override;
end;
TcxGridViewData = class(cxGridTableView.TcxGridViewData)
protected
function GetRecordClass(ARecordInfo: TcxRowInfo): TcxCustomGridRecordClass; override;
end;
implementation
....
end.
我用它作为
unt frm_MainForm;
uses
...
cxGridRows,
cxGridTableView,
cxGridCustomTableView,
cxCustomData,
cxGraphics
cxClasses,
cxData,
cxGridRows,
// Really the last unit
unt_QuantumGridInterceptor;
type
TcxGridDataCellViewInfo = class(unt_QuantumGridInterceptor.TcxGridDataCellViewInfo);
TcxGridDataRowViewInfo = class(unt_QuantumGridInterceptor.TcxGridDataRowViewInfo);
TcxGridDataRow = class(unt_QuantumGridInterceptor.TcxGridDataRow);
TcxGridViewData = class(unt_QuantumGridInterceptor.TcxGridViewData);
TfrmMainForm = class sealed(TForm)
...
但是内插器类重写方法没有被调用,并且它们的制动点保持“深绿色”非活动颜色而不是“淡蓝色”活动。
我缺少什么?
答案 0 :(得分:2)
我错过了:
TcxGridBandedTableView = class(cxGridBandedTableView.TcxGridBandedTableView)
protected
function GetViewDataClass: cxGridCustomView.TcxCustomGridViewDataClass; override;
end;