Using dev express makes it really easy to extend the Quantum Grid Views as described in
http://devexpress.com/Support/Center/KB/p/A334.aspx?searchtext=viewinfo
you just have to declare and overwrite the methods you need:
TMyGridDBTableView = class(TcxGridDBTableView)
protected
function GetViewInfoClass: TcxCustomGridViewInfoClass; override;
end;
But in order to cosume the TMyGridDBTableView you either
- have to install it as a component package with RegisterComponent()
or build the whole UI from code like this
View := Grid.CreateView(TMyGridDBTableView) as TMyGridDBTableView; View.OptionsView.ColumnAutoWidth := True; View.OptionsView.NewItemRow := True; View.DataController.DataSource := DataSource1; View.DataController.CreateAllItems;
Neither of the ways is good to me because:
- I dropped installation of components in the IDE years ago due to unwillingness to rebuild, reinstall them after each small change and even though I write lots of components I initialize them with code
- I still install the dev express components though and manipulate them through the UI. Having to switch to pure source code instantination of all views will result in literally thousands of lines of code.
Is there a way I keep my already form-designed TMyGridDBTableView but enhanced them at runtime with the TMyGridDBTableView overloaded methods?