Hi Nikolay,
Here's the way I do it.
Create a Container class that has all the grid properties and methods you wish to modify.
Create a Container class that has all the column properties and methods you wish to modify.
The idea is that at run time this container class knows how to instantiate a real grid with real columns, based on the placeholder ones. This allows you to have visual entities to write code to.
>Thank you Charles and Cetin for the sample code.
>
>I think it is good idea to place in the "Toledo Wish list" an item like this:
>
>Title: Visually sub classing Column and Header base classes
>
>Description: Please give programmers possibility: 1) visually to create custom column and header classes and 2) easy way to change defaults when creating columns in Project Manager/ Class Browser or at run time.
>
>That means new read/write properties for Grid and Column classes:
>For Grid:
>Property ColumnDefaultClass, Defaults to "Column"
>For Column:
>Property HeaderDefaultClass, Defaults to "Header"
>Property ControlDefaultClass, Defaults to "Textbox"
>
>These properties to be used when:
>1. Increase Grid property ColumnCount
>2. In AddColumn method
Charlie