I have created a component by extending cxGrid and added some required properties, I want to do same and add some extra functionalities to cxGridDBTableView, I tried extending the cxGridDBTableView and added properties, but I am not able to access those properties because when i drop my TdxdmGrid It is using the default cxgridTableView but I want to use TdxdmGridDbtableView,
I tried like below, But it is showing 2 different components and the view I designed is not linked to the grid.
How can this be achieved? Please help.
Thank you.
cxGridRegisteredViews
, not with RegisterComponets()
TcxGrid.GetDefaultViewClass()
. DefaultView is View which is created when you put your Grid to Form TDXPDMGrid = class(TcxGrid)
...
protected
function GetDefaultViewClass: TcxCustomGridViewClass; override;
...
end;
...
function TDXPDMGrid.GetDefaultViewClass: TcxCustomGridViewClass;
begin
Result := TDXPDMGridDBTableView;
end;
...
initialization
cxGridRegisteredViews.Register(TDXPDMGridDBTableView, 'PDM Table');
...
finalization
cxGridRegisteredViews.Unregister(TDXPDMGridDBTableView);